Skip to content

Fix for issue #1257 and partial fix for #1033

Vinay Rosenberg requested to merge github/fork/dsparacio/development into development

Created by: dsparacio

Added discrete event for loaded/empty parallel to BufferStateChange. So now you have maximum versatility.


mediaPlayer.on(dashjs.MediaPlayer.events.BUFFER_EMPTY, onBufferEmpty)
mediaPlayer.on(dashjs.MediaPlayer.events.BUFFER_LOADED, onBufferLoaded)
mediaPlayer.on(dashjs.MediaPlayer.events.BUFFER_LEVEL_STATE_CHANGED, onBufferStateChange)

function onBufferStateChange(e) {
    if (e.mediaType === "video") {
        console.log("onBufferStateChange", e.state);
    }
}
function onBufferLoaded(e) {
    if (e.mediaType === "video") {
        console.log("onBufferLoaded");
    }
}
function onBufferEmpty(e) {
    if (e.mediaType === "video") {
        console.log("onBufferEmpty");
    }
}

Another change committed in this PR is part of the fix for #1033 (closed)

Merge request reports