Skip to content

Commit

Permalink
don't autoplay hls
Browse files Browse the repository at this point in the history
  • Loading branch information
edsilv committed May 8, 2018
1 parent 2f06d18 commit 75fbc36
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/iiif-av-component.bundle.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/iiif-av-component.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ interface Array<T> {
*/
includes(searchElement: T, fromIndex?: number): boolean;
}
interface Window {
MediaSource: any;
WebKitMediaSource: any;
}
declare var dashjs: any;
declare var Hls: any;

Expand Down
4 changes: 2 additions & 2 deletions dist/iiif-av-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -938,13 +938,13 @@ var IIIFComponents;
hls.loadSource(data.source);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, function () {
video.play();
//video.play();
});
}
else if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = data.source;
video.addEventListener('canplay', function () {
video.play();
//video.play();
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/iiif-av-component.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/js/iiif-av-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -938,13 +938,13 @@ var IIIFComponents;
hls.loadSource(data.source);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, function () {
video.play();
//video.play();
});
}
else if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = data.source;
video.addEventListener('canplay', function () {
video.play();
//video.play();
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iiif-av-component",
"version": "0.0.39",
"version": "0.0.40",
"description": "",
"main": "index.js",
"types": "./dist/iiif-av-component.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/CanvasInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ namespace IIIFComponents {
hls.loadSource(data.source);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, function () {
video.play();
//video.play();
});
}
// hls.js is not supported on platforms that do not have Media Source Extensions (MSE) enabled.
Expand All @@ -640,7 +640,7 @@ namespace IIIFComponents {
else if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = data.source;
video.addEventListener('canplay', function () {
video.play();
//video.play();
});
}
} else {
Expand Down

0 comments on commit 75fbc36

Please sign in to comment.