Skip to content

Commit

Permalink
14.0.1
Browse files Browse the repository at this point in the history
- updates to rmp-connection 2.1.0
- removes some dead CSS from IAB sample SIMID integration
- adds simid-selector test
- updates dependencies
  • Loading branch information
radiantmediaplayer committed Mar 13, 2024
1 parent d8d3a74 commit f4fa63a
Show file tree
Hide file tree
Showing 12 changed files with 290 additions and 193 deletions.
14 changes: 10 additions & 4 deletions dist/rmp-vast.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/rmp-vast.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/rmp-vast.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/rmp-vast.min.js.map

Large diffs are not rendered by default.

312 changes: 156 additions & 156 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rmp-vast",
"version": "14.0.0",
"version": "14.0.1",
"author": "Radiant Media Player <[email protected]>",
"description": "A client-side JavaScript solution to load, parse and display VAST resources (advertising)",
"repository": {
Expand Down Expand Up @@ -33,9 +33,9 @@
},
"homepage": "https://www.radiantmediaplayer.com/rmp-vast/app/",
"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/plugin-transform-runtime": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@babel/core": "^7.24.0",
"@babel/plugin-transform-runtime": "^7.24.0",
"@babel/preset-env": "^7.24.0",
"babel-loader": "^9.1.3",
"clean-webpack-plugin": "^4.0.0",
"css-loader": "^6.10.0",
Expand All @@ -52,16 +52,16 @@
"stylelint": "^16.2.1",
"stylelint-config-standard": "^36.0.0",
"stylelint-webpack-plugin": "^5.0.0",
"terser": "^5.28.1",
"terser": "^5.29.1",
"terser-webpack-plugin": "^5.3.10",
"typescript": "^5.3.3",
"typescript": "^5.4.2",
"webpack": "^5.90.3",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.2"
"webpack-dev-server": "^5.0.3"
},
"dependencies": {
"@babel/runtime-corejs3": "^7.23.9",
"@types/node": "^20.11.20",
"@babel/runtime-corejs3": "^7.24.0",
"@types/node": "^20.11.26",
"core-js": "^3.36.0",
"regenerator-runtime": "^0.14.1",
"whatwg-fetch": "^3.6.20"
Expand Down
12 changes: 9 additions & 3 deletions src/assets/rmp-connection/rmp-connection.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license Copyright (c) 2015-2022 Radiant Media Player | https://www.radiantmediaplayer.com
* rmp-connection 2.0.0 | https://github.com/radiantmediaplayer/rmp-connection
* rmp-connection 2.1.0 | https://github.com/radiantmediaplayer/rmp-connection
* rmp-connection is released under MIT | https://github.com/radiantmediaplayer/rmp-connection/blob/master/LICENSE
*/

Expand All @@ -26,6 +26,8 @@ export default class RmpConnection {
return 'ethernet';
case 'wifi':
case 'wimax':
case 'mixed':
case 'other':
return 'wifi';
case 'bluetooth':
case 'cellular':
Expand Down Expand Up @@ -55,6 +57,8 @@ export default class RmpConnection {
return 0.35;
case '4g':
return 1.4;
case '5g':
return 5;
default:
break;
}
Expand All @@ -63,6 +67,8 @@ export default class RmpConnection {
case 'ethernet':
case 'wifi':
case 'wimax':
case 'mixed':
case 'other':
return 1.4;
case 'bluetooth':
case 'cellular':
Expand All @@ -73,7 +79,7 @@ export default class RmpConnection {
break;
}
}
return 0.025;
return 0.35;
}

/**
Expand Down Expand Up @@ -110,4 +116,4 @@ export default class RmpConnection {
connectionType: this._getConnectionType()
};
}
}
}
16 changes: 0 additions & 16 deletions src/less/rmp-vast.less
Original file line number Diff line number Diff line change
Expand Up @@ -233,19 +233,3 @@
width: 100%;
height: 100%;
}

.overlayed {
position: absolute;
top: 0;
width: 640px;
height: 480px;
}

.content {
width: 640px;
height: 480px;
}

.hidden {
display: none;
}
36 changes: 36 additions & 0 deletions test/spec/simidSpec/simid-selector.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<title>simid-selector</title>

<!-- jasmine -->
<link rel="shortcut icon" type="image/png" href="../../lib/jasmine-5.1.2/jasmine_favicon.png">
<link rel="stylesheet" href="../../lib/jasmine-5.1.2/jasmine.css">
<script src="../../lib/jasmine-5.1.2/jasmine.js"></script>
<script src="../../lib/jasmine-5.1.2/jasmine-html.js"></script>
<script src="../../lib/jasmine-5.1.2/boot0.js"></script>
<script src="../../lib/jasmine-5.1.2/boot1.js"></script>
<link rel="stylesheet" href="../../../app/css/app.css">

<!-- rmp-vast -->
<script src="../../../dist/rmp-vast.min.js"></script>

</head>

<body>
<div class="rmp-container" id="rmp">
<div class="rmp-content">
<video class="rmp-video" src="https://www.rmp-streaming.com/media/big-buck-bunny-360p.mp4" playsinline disableRemotePlayback disablePictureInPicture>
</video>
</div>
</div>
<br>
<p>To pass test pick an ad to watch.</p>
<!-- spec file -->
<script src="spec/simid-selector.js"></script>
</body>

</html>
65 changes: 65 additions & 0 deletions test/spec/simidSpec/spec/simid-selector.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
const ADTAG = 'https://www.radiantmediaplayer.com/vast/tags/simid-selector.xml';

describe('Test for simid-selector', function () {

const id = 'rmp';
const container = document.getElementById(id);
const video = document.querySelector('.rmp-video');
const rmpVast = new RmpVast(id);
const env = rmpVast.environment;
video.muted = true;
if (env.isAndroid[0] || env.isIos[0]) {
container.style.width = '320px';
container.style.height = '180px';
}
const title = document.getElementsByTagName('title')[0];

it('should load and play simid-selector', function (done) {
let validSteps = 0;

const _incrementAndLog = function (event) {
validSteps++;
if (event && event.type) {
console.log(event.type);
}
};

rmpVast.on('adloaded', function (e) {
_incrementAndLog(e);
});
rmpVast.on('addurationchange', function (e) {
_incrementAndLog(e);
});
rmpVast.on('adstarted', function (e) {
if (env.isAndroid[0] || env.isIos[0]) {
rmpVast.resizeAd(320, 180, 'normal');
}
_incrementAndLog(e);
});
rmpVast.on('adtagstartloading', function (e) {
_incrementAndLog(e);
});
rmpVast.on('adtagloaded', function (e) {
_incrementAndLog(e);
});
rmpVast.on('addestroyed', function (e) {
_incrementAndLog(e);
let timeupdateCount = 0;
video.addEventListener('timeupdate', function (e) {
timeupdateCount++;
if (timeupdateCount === 5) {
_incrementAndLog(e);
if (validSteps === 7) {
expect(validSteps).toBe(7);
title.textContent = 'Test completed';
done();
}
}
});
});

rmpVast.loadAds(ADTAG);
});


});
2 changes: 1 addition & 1 deletion types/assets/rmp-connection/rmp-connection.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license Copyright (c) 2015-2022 Radiant Media Player | https://www.radiantmediaplayer.com
* rmp-connection 2.0.0 | https://github.com/radiantmediaplayer/rmp-connection
* rmp-connection 2.1.0 | https://github.com/radiantmediaplayer/rmp-connection
* rmp-connection is released under MIT | https://github.com/radiantmediaplayer/rmp-connection/blob/master/LICENSE
*/
/**
Expand Down
2 changes: 1 addition & 1 deletion types/assets/rmp-connection/rmp-connection.d.ts.map

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

0 comments on commit f4fa63a

Please sign in to comment.