Skip to content

Commit

Permalink
add canSeekChange event listener to allow seeking on seekable streams
Browse files Browse the repository at this point in the history
  • Loading branch information
rwlodkowski committed Feb 5, 2014
1 parent b0194d9 commit d07b6ef
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/models/player.audio.video.osmf.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ $p.newModel({
MBRItemChange: "OSMF_universal",
isDynamicStreamChange: "OSMF_updateDynamicStream",
autoSwitchChange: "OSMF_updateDynamicStream",
switchingChange: "OSMF_updateDynamicStream"
switchingChange: "OSMF_updateDynamicStream",
canSeekChange: "OSMF_canSeekChange"
},

applyMedia: function(destContainer) {
Expand Down Expand Up @@ -300,6 +301,16 @@ $p.newModel({
this.sendUpdate('availableQualitiesChange', result);
},

OSMF_canSeekChange: function(enabled) {
if(enabled){
this.allowRandomSeek = true;
this.media.loadProgress = 100;
}
else {
this.allowRandomSeek = false;
}
},

/* todo */
switchDynamicStreamIndex: function(index) {
if (index==-1) {
Expand Down

0 comments on commit d07b6ef

Please sign in to comment.