@flashphoner/websdk 2.0.229 → 2.0.230
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docTemplate/README.md +1 -1
- package/examples/demo/streaming/hls-js-player/hls-js-player.js +16 -15
- package/examples/demo/streaming/hls-player/hls-player.js +1 -0
- package/examples/demo/streaming/hls-player/video-js.css +207 -268
- package/examples/demo/streaming/hls-player/video.js +22145 -14966
- package/examples/demo/streaming/hls-player/video.min.js +16 -30
- package/package.json +1 -1
package/docTemplate/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var Browser = Flashphoner.Browser;
|
|
2
2
|
var remoteVideo = null;
|
|
3
|
-
var hlsPlayer = null
|
|
3
|
+
var hlsPlayer = null;
|
|
4
4
|
|
|
5
5
|
function loadPlayerPage() {
|
|
6
6
|
$("#playerPage").load("../hls-player/player-page.html", initPage );
|
|
@@ -9,7 +9,13 @@ function loadPlayerPage() {
|
|
|
9
9
|
function initPage() {
|
|
10
10
|
$("#header").text("HLS.JS Player Minimal");
|
|
11
11
|
$("#urlServer").val(getHLSUrl());
|
|
12
|
-
$("#applyBtn").prop('disabled',
|
|
12
|
+
$("#applyBtn").prop('disabled', true).text("Play").off('click').click(playBtnClick);
|
|
13
|
+
if (Hls.isSupported()) {
|
|
14
|
+
console.log("Using HLS.JS " + Hls.version);
|
|
15
|
+
$("#applyBtn").prop('disabled', false);
|
|
16
|
+
} else {
|
|
17
|
+
$("#notifyFlash").text("Your browser doesn't support MSE technology required to play video");
|
|
18
|
+
}
|
|
13
19
|
remoteVideo = document.getElementById('remoteVideo');
|
|
14
20
|
remoteVideo.style ="background-color: lightgrey;";
|
|
15
21
|
$('#llHlsMode').show();
|
|
@@ -27,19 +33,13 @@ function playBtnClick() {
|
|
|
27
33
|
if (key.length > 0 && token.length > 0) {
|
|
28
34
|
videoSrc += "?" + key + "=" + token;
|
|
29
35
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
hlsPlayer.loadSource(videoSrc);
|
|
38
|
-
hlsPlayer.attachMedia(remoteVideo);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
$("#notifyFlash").text("Your browser doesn't support MSE technology required to play video");
|
|
42
|
-
}
|
|
36
|
+
hlsPlayer = new Hls(getHlsConfig(llHlsEnabled));
|
|
37
|
+
hlsPlayer.on(Hls.Events.MANIFEST_PARSED, function() {
|
|
38
|
+
console.log("Play with HLS.js");
|
|
39
|
+
remoteVideo.play();
|
|
40
|
+
});
|
|
41
|
+
hlsPlayer.loadSource(videoSrc);
|
|
42
|
+
hlsPlayer.attachMedia(remoteVideo);
|
|
43
43
|
onStarted();
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -52,6 +52,7 @@ function getHlsConfig(llHlsEnabled) {
|
|
|
52
52
|
backBufferLength: 90,
|
|
53
53
|
manifestLoadingTimeOut: 15000
|
|
54
54
|
};
|
|
55
|
+
console.log("Low Latency HLS: "+llHlsEnabled)
|
|
55
56
|
if(llHlsEnabled) {
|
|
56
57
|
// Here we configure HLS.JS for lower latency
|
|
57
58
|
config = {
|
|
@@ -126,6 +126,7 @@ function removeHighlight(input) {
|
|
|
126
126
|
|
|
127
127
|
function initVideoJsPlayer(video) {
|
|
128
128
|
var videoJsPlayer = videojs(video);
|
|
129
|
+
console.log("Using VideoJs " + videojs.VERSION);
|
|
129
130
|
if (Browser.isSafariWebRTC() && Browser.isiOS()) {
|
|
130
131
|
// iOS hack when using standard controls to leave fullscreen mode
|
|
131
132
|
var videoTag = getActualVideoTag();
|