Skip to content

Commit

Permalink
Merge pull request #244 from ant-media/release/2.8.2
Browse files Browse the repository at this point in the history
Update web_player and add placeholder for web_player
  • Loading branch information
mekya committed Feb 2, 2024
2 parents 31a1dd7 + 4ba704d commit 2dd440f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@angular/platform-browser-dynamic": "^10.0.8",
"@angular/platform-server": "^10.0.8",
"@angular/router": "^10.0.8",
"@antmedia/web_player": "^2.8.0-SNAPSHOT-Jan-22-2024-1820",
"@antmedia/web_player": "^2.8.0-SNAPSHOT-Jan-29-2024-2339",
"@ngui/map": "0.30.3",
"@ngui/ngui": "0.15.2",
"@types/googlemaps": "3.39.11",
Expand Down
17 changes: 13 additions & 4 deletions src/app/app.page/app.page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -861,14 +861,20 @@ export class AppPageComponent implements OnInit, OnDestroy, AfterViewInit {
* @param playOrder
*/
openPlayer(htmlCode: string, objectId: string, streamId: string, width: string, tokenId: string, vodName:string, playOrder:string[]): void {
htmlCode = '<div id="video_container" style="height:360px;overflow:hidden">'
+ '</div>';
htmlCode = '<div id="video_container" style="height:360px;overflow:hidden">'
+ '</div>'
+ '<div id="place_holder" style="height:360px;overflow:hidden;display:flex;align-items: center;justify-content: center;">The streaming will begin shortly...</div>'

const broadcast = this.getBroadcastByStreamId(streamId);
const typePlayList = broadcast != null && broadcast.type === "playlist";

var playOrderLocal = ["webrtc", "hls", "dash"];

if (!this.isEnterpriseEdition) {
//if it's not enterprise edition, only hls is supported
playOrderLocal = ["hls"];
}

if (typePlayList) {
playOrderLocal = ["hls"];
}
Expand Down Expand Up @@ -902,12 +908,15 @@ export class AppPageComponent implements OnInit, OnDestroy, AfterViewInit {
videoHTMLContent: '<video id="video-player" class="video-js vjs-default-skin vjs-big-play-centered" controls playsinline style="width:100%;height:100%"></video>',
},
document.getElementById("video_container"),
null);
document.getElementById("place_holder"));

embeddedPlayer.initialize().then(() => {
embeddedPlayer.play();
}).catch((error) => {
console.error("Error while initializing embedded player: " + error);
});


},
onClose: function () {
//var ifr = document.getElementById(objectId);
Expand Down

0 comments on commit 2dd440f

Please sign in to comment.