Skip to content

Commit

Permalink
version 0.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
screeley committed Oct 24, 2017
1 parent 7ba2021 commit 6beeb86
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016, Embed.ly, Inc.
Copyright (c) 2017, Embed.ly, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Install
Player.js is hosted on Embedly's CDN. :

```html
<script type="text/javascript" src="//cdn.embed.ly/player-0.0.12.min.js"></script>
<script type="text/javascript" src="//cdn.embed.ly/player-0.1.0.min.js"></script>
```

install via npm :
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "player.js",
"version": "0.0.12",
"version": "0.1.0",
"homepage": "http://playerjs.io",
"authors": [
"Embedly"
],
"description": "Control embedded video and audio across multiple providers",
"main": "dist/player-0.0.12.js",
"main": "dist/player-0.1.0.js",
"moduleType": [
"globals"
],
Expand Down
1 change: 0 additions & 1 deletion dist/player-0.0.12.min.js

This file was deleted.

21 changes: 14 additions & 7 deletions dist/player-0.0.12.js → dist/player-0.1.0.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Player.js - v0.0.12 - 2017-05-25
/*! Player.js - v0.1.0 - 2017-10-24
* http://github.com/embedly/player.js
* Copyright (c) 2017 Embedly; Licensed BSD */
(function(window, document){
Expand Down Expand Up @@ -294,6 +294,12 @@ playerjs.Player.prototype.init = function(elem, options){

this.elem = elem;

// make sure we have an iframe
playerjs.assert(elem.nodeName === 'IFRAME',
'playerjs.Player constructor requires an Iframe, got "'+elem.nodeName+'"');
playerjs.assert(elem.src,
'playerjs.Player constructor requires a Iframe with a \'src\' attribute.');

// Figure out the origin of where we are sending messages.
this.origin = playerjs.origin(elem.src);

Expand Down Expand Up @@ -761,7 +767,7 @@ playerjs.HTML5Adapter = function(video){

playerjs.HTML5Adapter.prototype.init = function(video){

playerjs.assert(video, 'playerjs.VideoJSReceiver requires a video element');
playerjs.assert(video, 'playerjs.HTML5Adapter requires a video element');

// Set up the actual receiver
var receiver = this.receiver = new playerjs.Receiver();
Expand Down Expand Up @@ -850,6 +856,7 @@ playerjs.HTML5Adapter.prototype.init = function(video){
playerjs.HTML5Adapter.prototype.ready = function(){
this.receiver.ready();
};

//http://www.longtailvideo.com/support/jw-player/28851/javascript-api-reference
playerjs.JWPlayerAdapter = function(player){
if (!(this instanceof playerjs.JWPlayerAdapter)) {
Expand All @@ -869,15 +876,15 @@ playerjs.JWPlayerAdapter.prototype.init = function(player){
this.looped = false;

/* EVENTS */
player.onPause(function(){
player.on('pause', function(){
receiver.emit('pause');
});

player.onPlay(function(){
player.on('play', function(){
receiver.emit('play');
});

player.onTime(function(e){
player.on('time', function(e){
var seconds = e.position,
duration = e.duration;

Expand All @@ -893,7 +900,7 @@ playerjs.JWPlayerAdapter.prototype.init = function(player){
});

var self = this;
player.onComplete(function(){
player.on('complete', function(){
// Fake the looping
if (self.looped === true){
// By default jwplayer seeks after play.
Expand All @@ -904,7 +911,7 @@ playerjs.JWPlayerAdapter.prototype.init = function(player){
}
});

player.onError(function(){
player.on('error', function(){
receiver.emit('error');
});

Expand Down
Loading

0 comments on commit 6beeb86

Please sign in to comment.