Skip to content

Commit

Permalink
replace attachVideo -> attachMedia in API.md and demo page
Browse files Browse the repository at this point in the history
  • Loading branch information
tchakabam committed Nov 16, 2015
1 parent 84c6207 commit 8ccaf6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let's
var video = document.getElementById('video');
var hls = new Hls();
// bind them together
hls.attachVideo(video);
hls.attachMedia(video);
// MSE_ATTACHED event is fired by hls object once MediaSource is ready
hls.on(Hls.Events.MSE_ATTACHED,function() {
console.log("video and hls.js are now bound together !");
Expand All @@ -53,7 +53,7 @@ you need to provide manifest URL as below:
var video = document.getElementById('video');
var hls = new Hls();
// bind them together
hls.attachVideo(video);
hls.attachMedia(video);
hls.on(Hls.Events.MSE_ATTACHED,function() {
console.log("video and hls.js are now bound together !");
hls.loadSource("http://my.streamURL.com/playlist.m3u8");
Expand Down Expand Up @@ -322,7 +322,7 @@ parameter should be a class providing 2 getter/setters and a destroy() method:
## Video Binding/Unbinding API
#### ```hls.attachVideo(videoElement)```
#### ```hls.attachMedia(videoElement)```
calling this method will :
- bind videoElement and hls instance,
Expand Down
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ <h4> Playback Control </h4>
<button type="button" class="btn btn-sm btn-info" onclick="$('#video')[0].currentTime-=10">currentTime-=10</button>
<button type="button" class="btn btn-sm btn-info" onclick="$('#video')[0].currentTime=$('#seek_pos').val()">seek to </button>
<input type="text" id='seek_pos' size="8" onkeydown="if(window.event.keyCode=='13'){$('#video')[0].currentTime=$('#seek_pos').val();}"><br><br>
<button type="button" class="btn btn-xs btn-warning" onclick="hls.attachVideo($('#video')[0])">attach Video</button>
<button type="button" class="btn btn-xs btn-warning" onclick="hls.attachMedia($('#video')[0])">attach Video</button>
<button type="button" class="btn btn-xs btn-warning" onclick="hls.detachVideo()">detach Video</button><br>
<button type="button" class="btn btn-xs btn-warning" onclick="hls.startLoad()">recover Network Error</button>
<button type="button" class="btn btn-xs btn-warning" onclick="hls.recoverMediaError()">recover Media Error</button><br>
Expand Down

0 comments on commit 8ccaf6b

Please sign in to comment.