Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update web_player and add placeholder for web_player #244

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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