Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

videojs-dynamic-overlay

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

videojs-dynamic-overlay - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

dist/videojs-newoverlay.cjs.js

@@ -7,3 +7,3 @@ 'use strict';

var version = "1.0.2";
var version = "1.0.3";

@@ -10,0 +10,0 @@ // Default options for the plugin.

import videojs from 'video.js';
var version = "1.0.2";
var version = "1.0.3";

@@ -5,0 +5,0 @@ // Default options for the plugin.

/**
* videojs-dynamic-overlay
* @version 1.0.2
* @version 1.0.3
* @copyright 2017 Emre Karatasoglu <emre.karatasoglu@hotmail.com>

@@ -15,3 +15,3 @@ * @license Apache-2.0

var version = "1.0.2";
var version = "1.0.3";

@@ -18,0 +18,0 @@ // Default options for the plugin.

/**
* videojs-dynamic-overlay
* @version 1.0.2
* @version 1.0.3
* @copyright 2017 Emre Karatasoglu <emre.karatasoglu@hotmail.com>
* @license Apache-2.0
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):e.videojsNewoverlay=t(e.videojs)}(this,function(e){"use strict";var t={contentOfOverlay:"burda",changeDuration:3e3},n=(e="default"in e?e["default"]:e).registerPlugin||e.plugin,o=e.dom||e,i=function d(e,t){var n=window.document.getElementById("videojs-newoverlay-player_html5_api").clientHeight,o=window.document.getElementById("videojs-newoverlay-player_html5_api").clientWidth,i=Math.floor(Math.random()*o);i>200&&(i-=200),e.style.left=i+"px";var a=Math.floor(Math.random()*n);a>60&&(a-=60),e.style.top=a+"px",setTimeout(function(){d(e,t)},t)},a=function(e,t){e.addClass("vjs-newoverlay");var n=o.createEl("div",{className:"vjs-emre"});n.innerHTML=t.contentOfOverlay,e.el().appendChild(n),i(n,t.changeDuration)},r=function(n){var o=this;this.ready(function(){a(o,e.mergeOptions(t,n))})};return n("newoverlay",r),r.VERSION="1.0.2",r});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):e.videojsNewoverlay=t(e.videojs)}(this,function(e){"use strict";var t={contentOfOverlay:"burda",changeDuration:3e3},n=(e="default"in e?e["default"]:e).registerPlugin||e.plugin,o=e.dom||e,i=function d(e,t){var n=window.document.getElementById("videojs-newoverlay-player_html5_api").clientHeight,o=window.document.getElementById("videojs-newoverlay-player_html5_api").clientWidth,i=Math.floor(Math.random()*o);i>200&&(i-=200),e.style.left=i+"px";var a=Math.floor(Math.random()*n);a>60&&(a-=60),e.style.top=a+"px",setTimeout(function(){d(e,t)},t)},a=function(e,t){e.addClass("vjs-newoverlay");var n=o.createEl("div",{className:"vjs-emre"});n.innerHTML=t.contentOfOverlay,e.el().appendChild(n),i(n,t.changeDuration)},r=function(n){var o=this;this.ready(function(){a(o,e.mergeOptions(t,n))})};return n("newoverlay",r),r.VERSION="1.0.3",r});
{
"name": "videojs-dynamic-overlay",
"version": "1.0.2",
"version": "1.0.3",
"description": "Video Üzerine Text Vb Dinamik Yer Değiştirme",

@@ -105,2 +105,3 @@ "main": "dist/videojs-newoverlay.cjs.js",

"directories": {
"example": "examples",
"test": "test"

@@ -107,0 +108,0 @@ },

@@ -48,38 +48,56 @@ # videojs-newoverlay

### Browserify/CommonJS
### No Need To Build
When using with Browserify, install videojs-newoverlay via npm and `require` the plugin as you would any other module.
Working example with built scripts .
```js
var videojs = require('video.js');
Quaility Selector
Dynamic Overlay that configurable
// The actual plugin function is exported by this module, but it is also
// attached to the `Player.prototype`; so, there is no need to assign it
// to a variable.
require('videojs-newoverlay');
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>videojs-newoverlay Demo</title>
<link href="video-js.css" rel="stylesheet">
var player = videojs('my-video');
</head>
<body>
<video id="videojs-newoverlay-player" class="video-js vjs-default-skin" controls height="480" width="848" poster="http://vjs.zencdn.net/v/oceans.png">
<source src="https://video-dev.github.io/streams/x36xhzz/x36xhzz.m3u8" type="application/x-mpegurl">
</video>
<script src="es5-shim.js"></script>
<script src="video.js"></script>
<script src="videojs-newoverlay.js"></script>
<script src="videojs-contrib-hls.js"></script>
<script src="videojs5-hlsjs-source-handler.js"></script>
<script>
(function(window, videojs) {
var player = window.player = videojs('videojs-newoverlay-player');
player.newoverlay({
contentOfOverlay:"Emre Karataşoğlu ID NUMBER",
changeDuration:10000
});
player.qualityPickerPlugin();
}(window, window.videojs));
</script>
</body>
</html>
<style>
.vjs-emre{
z-index:9999;
color:black;
background-color:brown;
font-size:20px;
position:absolute;
width: 170px; word-break: break-all; word-wrap: break-word;
right:20px;
player.newoverlay();
################ OR ###############
player.newoverlay({
contentOfOverlay:"Sample Content",
changeDuration:1000
});
}
</style>
```
### RequireJS/AMD
When using with RequireJS (or another AMD library), get the script in whatever way you prefer and `require` the plugin as you normally would:
```js
require(['video.js', 'videojs-newoverlay'], function(videojs) {
var player = videojs('my-video');
player.newoverlay();
});
```
## License

@@ -86,0 +104,0 @@

@@ -37,3 +37,3 @@ (function (QUnit,sinon,videojs) {

var version = "1.0.2";
var version = "1.0.3";

@@ -40,0 +40,0 @@ // Default options for the plugin.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc