Skip to content

Commit

Permalink
Merge pull request #1 from heff/Akkuma-master
Browse files Browse the repository at this point in the history
Updates for videojs#1093
  • Loading branch information
Akkuma committed May 6, 2014
2 parents 799f176 + 27f0f78 commit e7617bf
Show file tree
Hide file tree
Showing 35 changed files with 504 additions and 187 deletions.
22 changes: 20 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,31 @@ CHANGELOG
=========

## HEAD (Unreleased)
* Updated the UI to support live video ([view](https://github.com/videojs/video.js/pull/1121))
* The UI now resets after a source change ([view](https://github.com/videojs/video.js/pull/1124))
* Now assuming smart CSS defaults for sliders to prevent reflow on player init ([view](https://github.com/videojs/video.js/pull/1122))
* Fixed the title element placement in menus [[view](https://github.com/videojs/video.js/pull/1114)]
* Fixed title support for menu buttons ([view](https://github.com/videojs/video.js/pull/1128))
* Fixed extra mousemove events on Windows caused by certain apps, not users [[view](https://github.com/videojs/video.js/pull/1068)]
* Fixed error due to undefined tech when no source is supported [[view](https://github.com/videojs/video.js/pull/1172)]
* Fixed the progress bar not finishing when manual timeupdate events are used [[view](https://github.com/videojs/video.js/pull/1173)]
* Added a more informative and styled fallback message for non-html5 browsers [[view](https://github.com/videojs/video.js/pull/1181)]

--------------------

## 4.5.2 (2014-04-12)
* Updated release versioning to include bower.json and component.json

## 4.5.1 (2014-03-27)
* Fixed a bug from the last release where canPlaySource was no longer exported

## 4.5.0 (2014-03-27)
* Added component(1) support ([view](https://github.com/videojs/video.js/pull/1032))
* Captions now move down when controls are hidden ([view](https://github.com/videojs/video.js/pull/1053))
* Added the .less source file to the distribution files ([view](https://github.com/videojs/video.js/pull/1056))
* Changed src() to return the current selected source ([view](https://github.com/videojs/video.js/pull/968))
* Added a grunt task for opening the next issue that needs addressing ([view](https://github.com/videojs/video.js/pull/1059))

--------------------
* Fixed Android 4.0+ devices' check for HLS support ([view](https://github.com/videojs/video.js/pull/1084))

## 4.4.3 (2014-03-06)
* Fixed bugs in IE9 Windows 7N with no Media Player ([view](https://github.com/videojs/video.js/pull/1060))
Expand Down
17 changes: 13 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,24 @@ cp sandbox/index.html.example sandbox/index.html
open sandbox/index.html
```

> #### NOTE: Testing Flash Locally in Chrome
> Chrome 21+ (as of 2013/01/01) doens't run Flash files that are local and loaded into a locally accessed page (file:///).

### Testing Locally
A simple Connect server is available via the Grunt plugin. The commands below will allow you to setup a test sandbox and begin development.

```bash
cp sandbox/index.html.example sandbox/index.html
grunt connect
open http://localhost:9999/sandbox/index.html
```

> NOTES regarding local testing in Chrome 21+ (as of 2013/01/01)
> Flash files that are local and loaded into a locally accessed page (file:///) will NOT run.
> To get around this you can do either of the following:
>
> 1. Do your development and testing using a local HTTP server.
> 1. Do your development and testing using a local HTTP server. See Grunt commands above.
>
> 2. [Disable the version of Flash included with Chrome](http://helpx.adobe.com/flash-player/kb/flash-player-google-chrome.html#How_can_I_run_debugger_or_alternate_versions_of_Flash_Player_in_Google_Chrome) and enable a system-wide version of Flash instead.

Commit and push changes as you go (using git directly). Write thorough descriptions of your changes in your commit messages.

```bash
Expand Down
36 changes: 32 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ module.exports = function(grunt) {
files: [ 'src/**/*', 'test/unit/*.js', 'Gruntfile.js' ],
tasks: 'dev'
},
connect: {
dev: {
options: {
port: 9999,
keepalive: true
}
}
},
copy: {
minor: {
files: [
Expand Down Expand Up @@ -171,9 +179,28 @@ module.exports = function(grunt) {
}
}
},
bump: {
files: ['package.json'],
updateConfigs: ['pkg']
version: {
options: {
pkg: 'package.json'
},
major: {
options: {
release: 'major'
},
src: ['package.json', 'bower.json', 'component.json']
},
minor: {
options: {
release: 'minor'
},
src: ['package.json', 'bower.json', 'component.json']
},
patch: {
options: {
release: 'patch'
},
src: ['package.json', 'bower.json', 'component.json']
}
},
tagrelease: {
file: 'package.json',
Expand All @@ -183,6 +210,7 @@ module.exports = function(grunt) {
}
});

grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-watch');
Expand All @@ -196,7 +224,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('videojs-doc-generator');
grunt.loadNpmTasks('grunt-zip');
grunt.loadNpmTasks('grunt-banner');
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('grunt-version');
grunt.loadNpmTasks('grunt-tagrelease');
grunt.loadNpmTasks('chg');

Expand Down
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "video.js",
"description": "An HTML5 and Flash video player with a common API and skin for both.",
"version": "4.4.3",
"version": "4.5.2",
"main": [
"dist/video-js/video.js",
"dist/video-js/video.js",
"dist/video-js/video-js.css"
],
"keywords": [
Expand All @@ -13,4 +13,4 @@
"video",
"player"
]
}
}
1 change: 1 addition & 0 deletions build/demo-files/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
<track kind="captions" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
<track kind="subtitles" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
</video>

</body>
Expand Down
1 change: 1 addition & 0 deletions build/source-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ var sourceFiles = [
"src/js/menu.js",
"src/js/player.js",
"src/js/control-bar/control-bar.js",
"src/js/control-bar/live-display.js",
"src/js/control-bar/play-toggle.js",
"src/js/control-bar/time-display.js",
"src/js/control-bar/fullscreen-toggle.js",
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "video.js",
"description": "An HTML5 and Flash video player with a common API and skin for both.",
"version": "4.4.2",
"version": "4.5.2",
"keywords": [
"videojs",
"html5",
Expand Down
6 changes: 3 additions & 3 deletions contrib.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@
"prompt": "confirm"
},
{
"id": "type",
"desc": "Provide the release type",
"prompt": {
"id": "type",
"message": "release type",
"default": "patch",
"type": "text"
Expand All @@ -278,8 +278,8 @@
"exec": "grunt chg-release:<%= type %>"
},
{
"desc": "Bump the package version",
"exec": "grunt bump-only:<%= type %>"
"desc": "Bump package versions",
"exec": "grunt version:<%= type %>"
},
{
"desc": "Build the release",
Expand Down
9 changes: 5 additions & 4 deletions docs/api/vjs.Player.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
##### RETURNS:
* `Boolean` Controls are showing

_defined in_: [src/js/player.js#L1167](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1167)
_defined in_: [src/js/player.js#L1174](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1174)

---

Expand Down Expand Up @@ -673,7 +673,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
* `String` poster URL when getting
* `vjs.Player` self when setting

_defined in_: [src/js/player.js#L1140](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1140)
_defined in_: [src/js/player.js#L1147](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1147)

---

Expand Down Expand Up @@ -778,9 +778,10 @@ _inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js
* __source__ `String|Object|Array` _(OPTIONAL)_ The source URL, object, or array of sources

##### RETURNS:
* `vjs.Player` self
* `String` The current video source when getting
* `String` The player when setting

_defined in_: [src/js/player.js#L1024](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1024)
_defined in_: [src/js/player.js#L1025](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1025)

---

Expand Down
9 changes: 5 additions & 4 deletions docs/guides/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ You can download the Video.js source and host it on your own servers, or use the
### CDN Version ###
```html
<link href="//vjs.zencdn.net/4.4/video-js.css" rel="stylesheet">
<script src="//vjs.zencdn.net/4.4/video.js"></script>
<link href="//vjs.zencdn.net/4.5/video-js.css" rel="stylesheet">
<script src="//vjs.zencdn.net/4.5/video.js"></script>
```

### Self Hosted. ###
Expand Down Expand Up @@ -57,6 +57,7 @@ Otherwise include/exclude attributes, settings, sources, and tracks exactly as y
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
</video>
```

Expand Down Expand Up @@ -89,13 +90,13 @@ The third argument is a 'ready' callback. Once Video.js has initialized it will
Instead of using an element ID, you can also pass a reference to the element itself.

```js
videojs(document.getElementsById('example_video_1')), {}, function()) {
videojs(document.getElementById('example_video_1'), {}, function() {
// This is functionally the same as the previous example.
});
```

```js
videojs(document.getElementsByClassName('awesome_video_class')[0], {}, function()) {
videojs(document.getElementsByClassName('awesome_video_class')[0], {}, function() {
// You can grab an element by class if you'd like, just make sure
// if it's an array that you pick one (here we chose the first).
});
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "video.js",
"description": "An HTML5 and Flash video player with a common API and skin for both.",
"version": "4.4.3",
"version": "4.5.2",
"copyright": "Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE",
"keywords": [
"videojs",
Expand All @@ -26,6 +26,7 @@
"devDependencies": {
"grunt-cli": "~0.1.0",
"grunt": "~0.4",
"grunt-contrib-connect": "~0.7.1",
"grunt-contrib-jshint": "~0.4.3",
"grunt-contrib-watch": "~0.1.4",
"grunt-contrib-qunit": "~0.2.1",
Expand Down Expand Up @@ -53,9 +54,9 @@
"grunt-zip": "0.10.2",
"grunt-banner": "~0.2.0",
"chg": "~0.1.8",
"grunt-bump": "0.0.13",
"grunt-tagrelease": "~0.3.3",
"github": "~0.1.14",
"open": "0.0.4"
"open": "0.0.4",
"grunt-version": "~0.3.0"
}
}
2 changes: 1 addition & 1 deletion sandbox/index.html.example
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm'>
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg'>
<track kind="captions" src="../build/demo-files/demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
<p>Video Playback Not Supported</p>
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
</video>

<script>
Expand Down
49 changes: 49 additions & 0 deletions src/css/video-js.less
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ fonts to show/hide properly.
top: 0;
left: 0;
height: 0.5em;
/* assuming volume starts at 1.0 */
width: 100%;

background: @slider-bar-color
url(@slider-bar-pattern)
Expand All @@ -311,6 +313,10 @@ fonts to show/hide properly.
.vjs-default-skin .vjs-volume-bar .vjs-volume-handle {
width: 0.5em;
height: 0.5em;
/* Assumes volume starts at 1.0. If you change the size of the
handle relative to the volume bar, you'll need to update this value
too. */
left: 4.5em;
}

.vjs-default-skin .vjs-volume-handle:before {
Expand Down Expand Up @@ -368,6 +374,8 @@ fonts to show/hide properly.
height: 100%;
margin: 0;
padding: 0;
/* updated by javascript during playback */
width: 0;
/* Needed for IE6 *///
left: 0;
top: 0;
Expand Down Expand Up @@ -400,6 +408,27 @@ fonts to show/hide properly.
padding-top: 0.1em /* Minor adjustment */;
}

/* Live Mode
--------------------------------------------------------------------------------
*/
.vjs-default-skin.vjs-live .vjs-time-controls,
.vjs-default-skin.vjs-live .vjs-time-divider,
.vjs-default-skin.vjs-live .vjs-progress-control {
display: none;
}
.vjs-default-skin.vjs-live .vjs-live-display {
display: block;
}

/* Live Display
--------------------------------------------------------------------------------
*/
.vjs-default-skin .vjs-live-display {
display: none;
font-size: 1em;
line-height: 3em;
}

/* Time Display
--------------------------------------------------------------------------------
*/
Expand Down Expand Up @@ -798,6 +827,26 @@ body.vjs-full-window {
visibility: visible;
}

/* In IE8 w/ no JavaScript (no HTML5 shim), the video tag doesn't register.
The .video-js classname on the video tag also isn't considered.
This optional paragraph inside the video tag can provide a message to users
about what's required to play video. */
.vjs-no-js {
padding: 20px;
color: #ccc;
background-color: #333;
font-size: 18px;
font-family: Arial, sans-serif;
text-align: center;
width: 300px;
height: 150px;
margin: 0px auto;
}

.vjs-no-js a, .vjs-no-js a:visited {
color: #F4A460;
}

// MIXINS
// =============================================================================
// Mixins are a LESS feature and are used to add vendor prefixes to CSS rules
Expand Down
Loading

0 comments on commit e7617bf

Please sign in to comment.