Skip to content

Commit

Permalink
Merge pull request #13 from ant-media/update-videojs-webrtc-plugin
Browse files Browse the repository at this point in the history
Update videojs-webrtc-plugin
  • Loading branch information
mekya authored Jun 21, 2024
2 parents 18543c7 + 2e8d23b commit 23b6988
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
15 changes: 9 additions & 6 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 @@ -29,7 +29,7 @@
},
"license": "ISC",
"dependencies": {
"@antmedia/videojs-webrtc-plugin": "^1.2.1",
"@antmedia/videojs-webrtc-plugin": "^1.2.2",
"@antmedia/webrtc_adaptor": "2.9.1-SNAPSHOT-2024-May-17-12-21",
"aframe": "1.5.0",
"dashjs": "^4.7.4",
Expand Down
14 changes: 12 additions & 2 deletions test/embedded-player.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ describe("WebPlayer", function() {


it("play", async function() {
this.timeout(10000);

var videoContainer = document.createElement("video_container");

var placeHolder = document.createElement("place_holder");
Expand All @@ -480,6 +482,8 @@ describe("WebPlayer", function() {
document.body.appendChild(fixture);

var player = new WebPlayer(windowComponent, videoContainer, placeHolder);

await player.initialize();
var playIfExists = sinon.replace(player, "playIfExists", sinon.fake());

player.play();
Expand All @@ -495,6 +499,7 @@ describe("WebPlayer", function() {

player = new WebPlayer(windowComponent, videoContainer, placeHolder);

await player.initialize();
var playWithVideoJS = sinon.replace(player, "playWithVideoJS", sinon.fake());

player.play();
Expand All @@ -516,6 +521,7 @@ describe("WebPlayer", function() {
addEventListener: window.addEventListener};

player = new WebPlayer(windowComponent, videoContainer, placeHolder);
await player.initialize();
var playViaDash = sinon.replace(player, "playViaDash", sinon.fake());
player.play();
expect(playViaDash.calledWithMatch("streams/stream123/stream123.mpd", "mpd")).to.be.true;
Expand Down Expand Up @@ -908,7 +914,7 @@ describe("WebPlayer", function() {

it("sendWebRTCData", async function() {


this.timeout(10000);
var videoContainer = document.createElement("video_container");

var placeHolder = document.createElement("place_holder");
Expand All @@ -921,7 +927,11 @@ describe("WebPlayer", function() {
document: document,
};


//videoContainer.innerHTML = STATIC_VIDEO_HTML;

// Append the fixture element to the document body
document.body.appendChild(videoPlayer);

var player = new WebPlayer(windowComponent, videoContainer, placeHolder);
//var playWithVideoJS = sinon.replace(player, "playWithVideoJS", sinon.fake());

Expand Down

0 comments on commit 23b6988

Please sign in to comment.