├── src
├── media
│ ├── images
│ │ └── title.png
│ └── css
│ │ ├── test.less
│ │ └── video4.less
├── static
│ ├── js
│ │ ├── jquery.jplayer.swf
│ │ ├── html5media.js
│ │ └── jquery.jplayer.min.js
│ ├── image
│ │ ├── jplayer.blue.monday.jpg
│ │ ├── jplayer.blue.monday.seeking.gif
│ │ └── jplayer.blue.monday.video.play.png
│ ├── css
│ │ └── jplayer.blue.monday.css
│ └── iframe
│ │ └── player.html
├── store
│ ├── index.js
│ └── models.js
├── components
│ ├── Message.js
│ ├── App.js
│ ├── Video4.js
│ ├── Count.jsx
│ ├── Root.js
│ ├── Video2.js
│ ├── Video.js
│ ├── Echarts2.js
│ ├── Echarts.js
│ ├── Inbox.js
│ └── Video3.js
├── index.ejs
├── routes
│ └── index.js
└── main.js
├── .stylelintrc
├── .babelrc
├── test
├── spec.js
└── .eslintrc
├── .gitignore
├── README.md
├── .travis.yml
├── tools
├── clean.js
├── build.js
├── copy.js
├── bundle.js
├── task.js
└── start.js
├── .gitattributes
├── .eslintrc
├── LICENSE.txt
├── postcss.config.js
├── package.json
└── webpack.config.js
/src/media/images/title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/localSummer/react-boilerplate-ie8/HEAD/src/media/images/title.png
--------------------------------------------------------------------------------
/.stylelintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "stylelint-config-standard",
3 | "rules": {
4 | "string-quotes": "single"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/static/js/jquery.jplayer.swf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/localSummer/react-boilerplate-ie8/HEAD/src/static/js/jquery.jplayer.swf
--------------------------------------------------------------------------------
/src/static/image/jplayer.blue.monday.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/localSummer/react-boilerplate-ie8/HEAD/src/static/image/jplayer.blue.monday.jpg
--------------------------------------------------------------------------------
/src/media/css/test.less:
--------------------------------------------------------------------------------
1 | button {
2 | span {
3 | color: red;
4 | border: 1px solid #000;
5 | border-radius: 8px;
6 | }
7 | }
--------------------------------------------------------------------------------
/src/static/image/jplayer.blue.monday.seeking.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/localSummer/react-boilerplate-ie8/HEAD/src/static/image/jplayer.blue.monday.seeking.gif
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "react",
4 | "es2015-loose",
5 | "stage-1"
6 | ],
7 | "plugins": [
8 | "transform-runtime"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/src/static/image/jplayer.blue.monday.video.play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/localSummer/react-boilerplate-ie8/HEAD/src/static/image/jplayer.blue.monday.video.play.png
--------------------------------------------------------------------------------
/src/store/index.js:
--------------------------------------------------------------------------------
1 | import { init } from '@rematch/core'
2 | import models from './models'
3 |
4 | const store = init({
5 | models,
6 | })
7 |
8 | export default store
--------------------------------------------------------------------------------
/test/spec.js:
--------------------------------------------------------------------------------
1 | import { expect } from 'chai'
2 |
3 | describe('test suite', () => {
4 |
5 | it('test', () => {
6 | expect(true).to.be.equal.true
7 | })
8 |
9 | })
10 |
--------------------------------------------------------------------------------
/test/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "mocha": true
4 | },
5 | "rules": {
6 | "no-console": 0,
7 | "no-unused-expressions": 0,
8 | "padded-blocks": 0
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Include your project-specific ignores in this file
2 | # Read about how to use .gitignore: https://help.github.com/articles/ignoring-files
3 |
4 | build/
5 | node_modules/
6 | npm-debug.log
7 | debug.log
8 | *.log
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # react-boilerplate-ie8
2 | react@0.14.9+react-router@2.3.0+rematch+axios+webpack+antd@1.11.6+echarts@4.1
3 |
4 | - cd react-boilerplate-ie8
5 | - npm i 或 yarn
6 | - npm run start 在IE8中无法调试,Chrome可以
7 | - npm run build 可在IE8以及Chrome中正常运行
8 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - '6'
4 | env:
5 | - CXX=g++-4.8
6 | addons:
7 | apt:
8 | sources:
9 | - ubuntu-toolchain-r-test
10 | packages:
11 | - g++-4.8
12 | script:
13 | - npm run lint
14 | - npm run test
15 |
--------------------------------------------------------------------------------
/src/components/Message.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | class Message extends React.Component {
4 | render() {
5 | return (
6 |
Message {this.props.params.id}
7 | )
8 | }
9 | }
10 |
11 | export default Message;
--------------------------------------------------------------------------------
/src/components/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | class App extends React.Component {
4 | render() {
5 | return (
6 |
7 | App
8 | {this.props.children}
9 |
10 | )
11 | }
12 | }
13 |
14 | export default App
--------------------------------------------------------------------------------
/src/components/Video4.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | class Video4 extends React.Component {
4 | render() {
5 | return (
6 |
12 | )
13 | }
14 | }
15 |
16 | export default Video4
--------------------------------------------------------------------------------
/tools/clean.js:
--------------------------------------------------------------------------------
1 | /**
2 | * React Static Boilerplate
3 | * https://github.com/koistya/react-static-boilerplate
4 | *
5 | * Copyright © 2015-2016 Konstantin Tarkus (@koistya)
6 | *
7 | * This source code is licensed under the MIT license found in the
8 | * LICENSE.txt file in the root directory of this source tree.
9 | */
10 |
11 | const del = require('del')
12 | const task = require('./task')
13 |
14 | module.exports = task('clean', () =>
15 | del(['./build/*', '!./build/.git'], { dot: true })
16 | )
17 |
--------------------------------------------------------------------------------
/tools/build.js:
--------------------------------------------------------------------------------
1 | /**
2 | * React Static Boilerplate
3 | * https://github.com/koistya/react-static-boilerplate
4 | *
5 | * Copyright © 2015-2016 Konstantin Tarkus (@koistya)
6 | *
7 | * This source code is licensed under the MIT license found in the
8 | * LICENSE.txt file in the root directory of this source tree.
9 | */
10 |
11 | const task = require('./task')
12 |
13 | module.exports = task('build', () => Promise.resolve()
14 | .then(() => require('./clean'))
15 | .then(() => require('./copy'))
16 | .then(() => require('./bundle'))
17 | )
18 |
--------------------------------------------------------------------------------
/tools/copy.js:
--------------------------------------------------------------------------------
1 | /**
2 | * React Static Boilerplate
3 | * https://github.com/koistya/react-static-boilerplate
4 | *
5 | * Copyright © 2015-2016 Konstantin Tarkus (@koistya)
6 | *
7 | * This source code is licensed under the MIT license found in the
8 | * LICENSE.txt file in the root directory of this source tree.
9 | */
10 |
11 | const task = require('./task')
12 | const fs = require('fs-extra')
13 |
14 | /**
15 | * Copies static files such as robots.txt, favicon.ico to the
16 | * output (build) folder.
17 | */
18 | module.exports = task('copy', fs.copy('./src/static', './build'))
19 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Automatically normalize line endings for all text-based files
2 | # http://git-scm.com/docs/gitattributes#_end_of_line_conversion
3 | * text=auto
4 |
5 | # For the following file types, normalize line endings to LF on
6 | # checkin and prevent conversion to CRLF when they are checked out
7 | # (this is required in order to prevent newline related issues like,
8 | # for example, after the build script is run)
9 | .* text eol=lf
10 | *.css text eol=lf
11 | *.html text eol=lf
12 | *.js text eol=lf
13 | *.json text eol=lf
14 | *.md text eol=lf
15 | *.txt text eol=lf
16 |
17 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "parser": "babel-eslint",
3 | "extends": "airbnb",
4 | "rules": {
5 | "semi": ["error", "never"],
6 | "react/prefer-stateless-function": 0,
7 | "global-require": 0,
8 | "linebreak-style": 0,
9 | "no-console": 0,
10 | "no-param-reassign": [2, {
11 | "props": false
12 | }]
13 | },
14 | "parserOptions": {
15 | "ecmaFeatures": {
16 | "jsx": true,
17 | "experimentalObjectRestSpread": true
18 | }
19 | },
20 | "env": {
21 | "browser": true,
22 | "node": true
23 | },
24 | "globals": {
25 | "document": true,
26 | "window": true
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/components/Count.jsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable react/prop-types */
2 | import React from 'react'
3 | import { connect } from 'react-redux'
4 |
5 | const Count = props => (
6 |
7 | The count is {props.count}
8 | increment
9 | incrementAsync
10 |
11 | )
12 |
13 | const mapState = state => ({
14 | count: state.count,
15 | })
16 |
17 | const mapDispatch = ({ count: { increment, incrementAsync } }) => ({
18 | increment: () => increment(1),
19 | incrementAsync: () => incrementAsync(1),
20 | })
21 |
22 | const CountContainer = connect(mapState, mapDispatch)(Count)
23 |
24 | export default CountContainer
25 |
--------------------------------------------------------------------------------
/src/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | IE8 React Redux Starter Kit
8 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/store/models.js:
--------------------------------------------------------------------------------
1 | const count = {
2 | state: 0, // initial state
3 | reducers: {
4 | // handle state changes with pure functions
5 | increment(state, payload) {
6 | return state + payload
7 | }
8 | },
9 | effects: {
10 | // handle state changes with impure functions.
11 | // use async/await for async actions
12 | async incrementAsync(payload, rootState) {
13 | await new Promise(resolve => setTimeout(resolve, 1000))
14 | this.increment(payload)
15 | }
16 | }
17 | }
18 |
19 | const player = {
20 | state: null,
21 | reducers: {
22 | updatePlayer(state, player) {
23 | return player
24 | }
25 | }
26 | }
27 |
28 | export default {
29 | count,
30 | player
31 | }
--------------------------------------------------------------------------------
/tools/bundle.js:
--------------------------------------------------------------------------------
1 | /**
2 | * React Static Boilerplate
3 | * https://github.com/koistya/react-static-boilerplate
4 | *
5 | * Copyright © 2015-2016 Konstantin Tarkus (@koistya)
6 | *
7 | * This source code is licensed under the MIT license found in the
8 | * LICENSE.txt file in the root directory of this source tree.
9 | */
10 |
11 | const webpack = require('webpack')
12 | const task = require('./task')
13 | const webpackConfig = require('../webpack.config')
14 |
15 | module.exports = task('bundle', new Promise((resolve, reject) => {
16 | const bundler = webpack(webpackConfig)
17 | const run = (err, stats) => {
18 | if (err) {
19 | reject(err)
20 | } else {
21 | console.log(stats.toString(webpackConfig.stats))
22 | resolve()
23 | }
24 | }
25 | bundler.run(run)
26 | }))
27 |
--------------------------------------------------------------------------------
/tools/task.js:
--------------------------------------------------------------------------------
1 | /**
2 | * React Static Boilerplate
3 | * https://github.com/koistya/react-static-boilerplate
4 | *
5 | * Copyright © 2015-2016 Konstantin Tarkus (@koistya)
6 | *
7 | * This source code is licensed under the MIT license found in the
8 | * LICENSE.txt file in the root directory of this source tree.
9 | */
10 |
11 | function format(time) {
12 | return time.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, '$1')
13 | }
14 |
15 | function task(name, action) {
16 | const start = new Date()
17 | console.log(`[${format(start)}] Starting '${name}'...`)
18 | return Promise.resolve(action instanceof Function ? action() : action).then(() => {
19 | const end = new Date()
20 | const time = end.getTime() - start.getTime()
21 | console.log(`[${format(end)}] Finished '${name}' after ${time}ms`)
22 | }, err => console.error(err.stack))
23 | }
24 |
25 | module.exports = task
26 |
--------------------------------------------------------------------------------
/src/media/css/video4.less:
--------------------------------------------------------------------------------
1 | html,
2 | body {
3 | height: 100%;
4 | text-align: center
5 | }
6 |
7 | .ctl {
8 | text-align: center;
9 | margin: 0 auto;
10 | width: 75%;
11 | height: 75%;
12 | }
13 |
14 | #vssplayer {
15 | width: 100%;
16 | height: 100%;
17 | /*position:absolute;*/
18 | text-align: center;
19 | background: #000;
20 | margin: 0 auto;
21 | border: 1px solid #F00
22 | }
23 |
24 | #div_btn {
25 | width: 80%;
26 | height: 20%;
27 | margin-top: 20px;
28 | /*position:absolute;*/
29 | text-align: center;
30 | margin: 0 auto;
31 | }
32 |
33 | .tab {
34 | width: 100%;
35 | height: 100%;
36 | text-align: center;
37 | }
38 |
39 | .tab table {
40 | width: 80%;
41 | height: 100%;
42 | text-align: center;
43 | }
44 |
45 | .tab input,.tab select {
46 | width: 100px;
47 | height: 25px;
48 | margin-left: 20px;
49 | text-align: center;
50 | }
--------------------------------------------------------------------------------
/src/components/Root.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import axios from 'axios'
3 | import Routes from '../routes/index'
4 |
5 | /*请求携带cookie,配置接口调用前缀*/
6 | axios.defaults.withCredentials = true;
7 | axios.defaults.baseURL = '/earth';
8 |
9 | class Root extends React.Component {
10 | componentWillMount() {
11 | axios.interceptors.request.use(function (config) {
12 | // 在发送请求之前做些什么
13 | return config;
14 | }, function (error) {
15 | // 对请求错误做些什么
16 | return Promise.reject(error);
17 | });
18 |
19 | // 添加响应拦截器
20 | axios.interceptors.response.use(function (response) {
21 | // 对响应数据做点什么
22 | console.log('response', response);
23 | return response;
24 | }, function (error) {
25 | // 对响应错误做点什么
26 | return Promise.reject(error);
27 | });
28 | }
29 |
30 | render() {
31 | return (
32 |
33 | )
34 | }
35 | }
36 |
37 | export default Root
--------------------------------------------------------------------------------
/src/components/Video2.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | class Video2 extends React.Component {
4 | render() {
5 | return (
6 |
16 | )
17 | }
18 | }
19 |
20 | export default Video2
21 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright (c) 2017 Konstantin Tarkus, John Ma. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/src/components/Video.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | class Video extends React.Component {
4 | handlePlay = () => {
5 | this.embed.play()
6 | }
7 |
8 | handlePause = () => {
9 | this.embed.pause()
10 | }
11 |
12 | handleStateChange = (stateChange) => {
13 | console.log(stateChange)
14 | }
15 |
16 | handleOnPlay = () => {
17 | console.log('start play')
18 | }
19 |
20 | handleOnPause = () => {
21 | console.log('pause')
22 | }
23 |
24 | render() {
25 | return (
26 |
27 | {this.embed = embed}}
30 | src="https://media.html5media.info/video.mp4"
31 | width="618"
32 | height="347"
33 | controls
34 | onreadystatechange={this.handleStateChange}
35 | onplay={this.handleOnPlay}
36 | onpause={this.handleOnPause}
37 | />
38 | 播放
39 | 暂停
40 |
41 | )
42 | }
43 | }
44 |
45 | export default Video
46 |
--------------------------------------------------------------------------------
/src/routes/index.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable react/jsx-filename-extension */
2 | // We only need to import the modules necessary for initial render
3 | import React from 'react'
4 | import { Router, Route, hashHistory, IndexRoute, Redirect } from 'react-router'
5 | import App from '../components/App'
6 | import Inbox from '../components/Inbox'
7 | import Message from '../components/Message'
8 | import Count from '../components/Count'
9 | import Echarts from '../components/Echarts'
10 | import Video from '../components/Video'
11 | import Video2 from '../components/Video2'
12 | import Video3 from '../components/Video3'
13 | import Video4 from '../components/Video4'
14 |
15 | const Routes = () => (
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | )
32 |
33 | export default Routes
34 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-underscore-dangle */
2 | /* eslint-disable no-undef */
3 | import React from 'react'
4 | import ReactDOM from 'react-dom'
5 | import { Provider } from 'react-redux'
6 | import store from './store/index'
7 | import Root from './components/Root'
8 | import 'antd/dist/antd.min.css'
9 |
10 | const MOUNT_NODE = document.getElementById('container')
11 |
12 | let render = () => {
13 | ReactDOM.render(
14 |
15 |
16 | ,
17 | MOUNT_NODE
18 | )
19 | }
20 |
21 | // Enable HMR and catch runtime errors in RedBox
22 | // This code is excluded from production bundle
23 | if (__DEV__) {
24 | if (module.hot) {
25 | // Development render functions
26 | const renderApp = render
27 | const renderError = (error) => {
28 | const RedBox = require('redbox-react').default
29 |
30 | ReactDOM.render( , MOUNT_NODE)
31 | }
32 |
33 | // Wrap render in try/catch
34 | render = () => {
35 | try {
36 | renderApp()
37 | } catch (error) {
38 | renderError(error)
39 | }
40 | }
41 |
42 | // Setup hot module replacement
43 | module.hot.accept('./routes/index', () =>
44 | setImmediate(() => {
45 | ReactDOM.unmountComponentAtNode(MOUNT_NODE)
46 | render()
47 | })
48 | )
49 | }
50 | }
51 |
52 | render()
53 |
--------------------------------------------------------------------------------
/src/components/Echarts2.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | class Echarts2 extends React.Component {
4 | state = {
5 | option: {
6 | color: ['#3398DB'],
7 | tooltip : {
8 | trigger: 'axis',
9 | axisPointer : { // 坐标轴指示器,坐标轴触发有效
10 | type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
11 | }
12 | },
13 | grid: {
14 | left: '3%',
15 | right: '4%',
16 | bottom: '3%',
17 | containLabel: true
18 | },
19 | xAxis : [
20 | {
21 | type : 'category',
22 | data : ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
23 | axisTick: {
24 | alignWithLabel: true
25 | }
26 | }
27 | ],
28 | yAxis : [
29 | {
30 | type : 'value'
31 | }
32 | ],
33 | series : [
34 | {
35 | name:'直接访问',
36 | type:'bar',
37 | barWidth: '60%',
38 | data:[10, 52, 200, 334, 390, 330, 220]
39 | }
40 | ]
41 | }
42 | }
43 |
44 | componentDidMount() {
45 | let {option} = this.state
46 | console.log(echarts)
47 | let charts = echarts.init(document.getElementById('charts2'))
48 | charts.setOption(option)
49 | }
50 |
51 | render() {
52 | return (
53 |
54 | )
55 | }
56 | }
57 |
58 | export default Echarts2
--------------------------------------------------------------------------------
/src/components/Echarts.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Echarts2 from './Echarts2'
3 |
4 | class Echarts extends React.Component {
5 | state = {
6 | option: {
7 | title : {
8 | text: '某站点用户访问来源',
9 | subtext: '纯属虚构',
10 | x:'center'
11 | },
12 | tooltip : {
13 | trigger: 'item',
14 | formatter: "{a} {b} : {c} ({d}%)"
15 | },
16 | legend: {
17 | orient: 'vertical',
18 | left: 'left',
19 | data: ['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
20 | },
21 | series : [
22 | {
23 | name: '访问来源',
24 | type: 'pie',
25 | radius : '55%',
26 | center: ['50%', '60%'],
27 | data:[
28 | {value:335, name:'直接访问'},
29 | {value:310, name:'邮件营销'},
30 | {value:234, name:'联盟广告'},
31 | {value:135, name:'视频广告'},
32 | {value:1548, name:'搜索引擎'}
33 | ],
34 | itemStyle: {
35 | emphasis: {
36 | shadowBlur: 10,
37 | shadowOffsetX: 0,
38 | shadowColor: 'rgba(0, 0, 0, 0.5)'
39 | }
40 | }
41 | }
42 | ]
43 | }
44 | }
45 |
46 | componentDidMount() {
47 | let {option} = this.state
48 | console.log(echarts)
49 | let charts = echarts.init(document.getElementById('charts'))
50 | charts.setOption(option)
51 | }
52 |
53 | render() {
54 | return (
55 |
59 | )
60 | }
61 | }
62 |
63 | export default Echarts
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | const AUTOPREFIXER_BROWSERS = [
2 | 'Android >= 4',
3 | 'Chrome >= 35',
4 | 'Firefox >= 31',
5 | 'Explorer >= 9',
6 | 'iOS >= 7',
7 | 'Opera >= 12',
8 | 'Safari >= 7.1',
9 | ]
10 |
11 | module.exports = {
12 | plugins: [
13 | // Transfer @import rule by inlining content, e.g. @import 'normalize.css'
14 | // https://github.com/postcss/postcss-import
15 | require('postcss-import')(),
16 | // W3C variables, e.g. :root { --color: red; } div { background: var(--color); }
17 | // https://github.com/postcss/postcss-custom-properties
18 | require('postcss-custom-properties')(),
19 | // W3C CSS Custom Media Queries, e.g. @custom-media --small-viewport (max-width: 30em);
20 | // https://github.com/postcss/postcss-custom-media
21 | require('postcss-custom-media')(),
22 | // CSS4 Media Queries, e.g. @media screen and (width >= 500px) and (width <= 1200px) { }
23 | // https://github.com/postcss/postcss-media-minmax
24 | require('postcss-media-minmax')(),
25 | // W3C CSS Custom Selectors, e.g. @custom-selector :--heading h1, h2, h3, h4, h5, h6;
26 | // https://github.com/postcss/postcss-custom-selectors
27 | require('postcss-custom-selectors')(),
28 | // W3C calc() function, e.g. div { height: calc(100px - 2em); }
29 | // https://github.com/postcss/postcss-calc
30 | require('postcss-calc')(),
31 | // Allows you to nest one style rule inside another
32 | // https://github.com/jonathantneal/postcss-nesting
33 | require('postcss-nesting')(),
34 | // W3C color() function, e.g. div { background: color(red alpha(90%)); }
35 | // https://github.com/postcss/postcss-color-function
36 | require('postcss-color-function')(),
37 | // Convert CSS shorthand filters to SVG equivalent, e.g. .blur { filter: blur(4px); }
38 | // https://github.com/iamvdo/pleeease-filters
39 | require('pleeease-filters')(),
40 | // Generate pixel fallback for "rem" units, e.g. div { margin: 2.5rem 2px 3em 100%; }
41 | // https://github.com/robwierzbowski/node-pixrem
42 | require('pixrem')(),
43 | // W3C CSS Level4 :matches() pseudo class, e.g. p:matches(:first-child, .special) { }
44 | // https://github.com/postcss/postcss-selector-matches
45 | require('postcss-selector-matches')(),
46 | // Transforms :not() W3C CSS Level 4 pseudo class to :not() CSS Level 3 selectors
47 | // https://github.com/postcss/postcss-selector-not
48 | require('postcss-selector-not')(),
49 | // Parse CSS and add vendor prefixes to rules
50 | // https://github.com/postcss/autoprefixer
51 | require('autoprefixer')({ browsers: AUTOPREFIXER_BROWSERS }),
52 | ],
53 | }
54 |
--------------------------------------------------------------------------------
/src/components/Inbox.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import axios from "axios";
3 | import json3 from "json3";
4 | import "../media/css/test.less";
5 | import title from "../media/images/title.png";
6 | import DatePicker from "antd/lib/date-picker";
7 |
8 | class Inbox extends React.Component {
9 | state = {
10 | data: null
11 | };
12 |
13 | componentDidMount() {
14 | console.log("发送请求");
15 | axios
16 | .get("http://jsonplaceholder.typicode.com/posts?userId=1")
17 | .then(result => {
18 | console.log(result);
19 | // console.log(json3.parse(result.data))
20 | console.log("set State");
21 | if (result.data.code === 1) {
22 | this.setState({
23 | data: result.data
24 | });
25 | } else {
26 | this.setState({
27 | data: result.data
28 | });
29 | }
30 | })
31 | .catch(err => {
32 | console.log(err);
33 | });
34 | let obj = { name: [1, 2], age: 2 };
35 | Object.keys(obj).forEach(item => {
36 | if (item === "name") {
37 | if (obj[item].includes(2)) {
38 | console.log(1);
39 | } else {
40 | console.log(3);
41 | }
42 | } else {
43 | console.log(obj[item]);
44 | }
45 | });
46 | }
47 |
48 | handleClick = () => {
49 | let { history } = this.props;
50 | history.push("/inbox/messages/1");
51 | };
52 |
53 | handleCount = () => {
54 | let { history } = this.props;
55 | history.push("/count");
56 | };
57 |
58 | handleVideo = () => {
59 | let { history } = this.props;
60 | history.push("/video");
61 | };
62 |
63 | handleVideo2 = () => {
64 | let { history } = this.props;
65 | history.push("/video2");
66 | };
67 |
68 | handleVideo3 = () => {
69 | let { history } = this.props;
70 | history.push("/video3");
71 | };
72 |
73 | handleVideo4 = () => {
74 | let { history } = this.props;
75 | history.push("/video4");
76 | };
77 |
78 | handleChange = (value, dateString) => {
79 | console.log(value, dateString);
80 | };
81 |
82 | render() {
83 | console.log(this.props);
84 | let { data } = this.state;
85 | return (
86 |
87 |
Inbox
88 |
89 |
90 | go messages
91 |
92 |
go count
93 |
go video
94 |
go video2
95 |
go video3
96 |
go video4
97 | {this.props.children || "Welcome to your Inbox"}
98 | {data ? (
99 | data.map(item => {
100 | return
{item.title + "-" + item.id}
;
101 | })
102 | ) : (
103 |
没有setState
104 | )}
105 |
106 |
107 | );
108 | }
109 | }
110 |
111 | export default Inbox;
112 |
--------------------------------------------------------------------------------
/tools/start.js:
--------------------------------------------------------------------------------
1 | /**
2 | * React Static Boilerplate
3 | * https://github.com/koistya/react-static-boilerplate
4 | *
5 | * Copyright © 2015-2016 Konstantin Tarkus (@koistya)
6 | *
7 | * This source code is licensed under the MIT license found in the
8 | * LICENSE.txt file in the root directory of this source tree.
9 | */
10 |
11 | const path = require("path");
12 | const browserSync = require("browser-sync");
13 | const webpack = require("webpack");
14 | const webpackDevMiddleware = require("webpack-dev-middleware");
15 | const webpackHotMiddleware = require("webpack-hot-middleware");
16 | const task = require("./task");
17 | const webpackConfig = require("../webpack.config");
18 | const url = require("url");
19 | const proxy = require("proxy-middleware");
20 | const proxyOptions = url.parse("http://192.168.110.85/dic");
21 | proxyOptions.route = "/dic";
22 |
23 | task(
24 | "start",
25 | () =>
26 | new Promise(resolve => {
27 | // Hot Module Replacement (HMR) + React Hot Reload
28 | if (webpackConfig.debug) {
29 | webpackConfig.entry.vendor.unshift(
30 | "react-hot-loader/patch",
31 | "webpack-hot-middleware/client"
32 | );
33 | webpackConfig.module.loaders
34 | .find(x => x.loader === "babel-loader")
35 | .query.plugins.unshift("react-hot-loader/babel");
36 | webpackConfig.plugins.push(new webpack.HotModuleReplacementPlugin());
37 | webpackConfig.plugins.push(new webpack.NoErrorsPlugin());
38 | }
39 |
40 | const bundler = webpack(webpackConfig);
41 |
42 | browserSync({
43 | port: Number(process.env.PORT || 3000),
44 | ui: {
45 | port: Number(process.env.PORT || 3000) + 1
46 | },
47 | server: {
48 | baseDir: "./src",
49 |
50 | middleware: [
51 | webpackDevMiddleware(bundler, {
52 | // IMPORTANT: dev middleware can't access webpackConfig, so we should
53 | // provide publicPath by ourselves
54 | publicPath: webpackConfig.output.publicPath,
55 |
56 | // pretty colored output
57 | stats: webpackConfig.stats
58 |
59 | // for other settings see
60 | // http://webpack.github.io/docs/webpack-dev-middleware.html
61 | }),
62 |
63 | // bundler should be the same as above
64 | webpackHotMiddleware(bundler),
65 |
66 | // Serve index.html for all unknown requests
67 | (req, res, next) => {
68 | if (req.headers.accept.startsWith("text/html")) {
69 | const filename = path.join(bundler.outputPath, "index.html");
70 | bundler.outputFileSystem.readFile(filename, (err, result) => {
71 | if (err) {
72 | next(err);
73 | return;
74 | }
75 | res.setHeader("Content-Type", "text/html");
76 | res.end(result);
77 | });
78 | }
79 | next();
80 | },
81 | proxy(proxyOptions)
82 | ]
83 | },
84 |
85 | // no need to watch '*.js' here, webpack will take care of it for us,
86 | // including full page reloads if HMR won't work
87 | files: ["build/**/*.css", "build/**/*.html"]
88 | });
89 |
90 | resolve();
91 | })
92 | );
93 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-static-boilerplate",
3 | "version": "0.0.0",
4 | "private": true,
5 | "engines": {
6 | "node": ">=6.5",
7 | "npm": ">=3.10"
8 | },
9 | "dependencies": {
10 | "@rematch/core": "^0.6.0",
11 | "antd": "1.11.6",
12 | "axios": "^0.18.0",
13 | "babel-polyfill": "^6.26.0",
14 | "classnames": "^2.2.5",
15 | "es5-shim": "^4.5.9",
16 | "es6-promise": "^4.1.1",
17 | "fetch-detector": "^1.0.1",
18 | "fetch-ie8": "^1.5.0",
19 | "fetch-jsonp": "^1.1.3",
20 | "history": "^2.1.2",
21 | "json3": "^3.3.2",
22 | "less": "^3.8.1",
23 | "less-loader": "^4.1.0",
24 | "prop-types": "^15.6.0",
25 | "proxy-middleware": "^0.15.0",
26 | "react": "^0.14.9",
27 | "react-dom": "^0.14.9",
28 | "react-redux": "^4.4.8",
29 | "react-router": "2.3.0",
30 | "react-router-redux": "^4.0.8",
31 | "redux": "^3.5.2",
32 | "redux-thunk": "^2.1.0"
33 | },
34 | "scripts": {
35 | "eslint": "eslint src/**/*.js tools/**/*.js",
36 | "stylelint": "stylelint src/components/**/*.css src/routes/**/*.css",
37 | "lint": "npm run eslint && npm run stylelint",
38 | "test": "mocha --compilers js:babel-register",
39 | "test:watch": "mocha --compilers js:babel-register --reporter min --watch",
40 | "clean": "node tools/clean",
41 | "build": "node tools/build --release",
42 | "build:debug": "node tools/build",
43 | "start": "node tools/start"
44 | },
45 | "devDependencies": {
46 | "autoprefixer": "^7.1.5",
47 | "babel-cli": "^6.26.0",
48 | "babel-core": "^6.26.0",
49 | "babel-eslint": "^8.0.1",
50 | "babel-loader": "^6.4.1",
51 | "babel-plugin-transform-es3-member-expression-literals": "^6.22.0",
52 | "babel-plugin-transform-es3-modules-literals": "0.0.3",
53 | "babel-plugin-transform-es3-property-literals": "^6.22.0",
54 | "babel-plugin-transform-react-constant-elements": "^6.23.0",
55 | "babel-plugin-transform-react-inline-elements": "^6.22.0",
56 | "babel-plugin-transform-react-remove-prop-types": "^0.4.10",
57 | "babel-plugin-transform-runtime": "^6.23.0",
58 | "babel-preset-es2015": "^6.24.1",
59 | "babel-preset-es2015-loose": "^7.0.0",
60 | "babel-preset-react": "^6.24.1",
61 | "babel-preset-stage-1": "^6.24.1",
62 | "babel-register": "^6.26.0",
63 | "babel-runtime": "^6.26.0",
64 | "browser-sync": "^2.18.13",
65 | "chai": "^4.1.2",
66 | "css-loader": "^0.28.7",
67 | "del": "^3.0.0",
68 | "es3ify-webpack-plugin": "^0.0.1",
69 | "eslint": "^4.9.0",
70 | "eslint-config-airbnb": "^16.1.0",
71 | "eslint-plugin-import": "^2.7.0",
72 | "eslint-plugin-jsx-a11y": "^6.0.2",
73 | "eslint-plugin-react": "^7.4.0",
74 | "extract-text-webpack-plugin": "^1.0.1",
75 | "file-loader": "^1.1.5",
76 | "fs-extra": "^4.0.1",
77 | "html-webpack-plugin": "^2.30.1",
78 | "json-loader": "^0.5.7",
79 | "mocha": "^4.0.1",
80 | "pixrem": "^4.0.1",
81 | "pleeease-filters": "^4.0.0",
82 | "postcss": "^6.0.13",
83 | "postcss-calc": "^6.0.1",
84 | "postcss-color-function": "^4.0.0",
85 | "postcss-custom-media": "^6.0.0",
86 | "postcss-custom-properties": "^6.2.0",
87 | "postcss-custom-selectors": "^4.0.1",
88 | "postcss-import": "^11.0.0",
89 | "postcss-loader": "^2.0.8",
90 | "postcss-media-minmax": "^3.0.0",
91 | "postcss-nesting": "^4.2.1",
92 | "postcss-selector-matches": "^3.0.1",
93 | "postcss-selector-not": "^3.0.1",
94 | "react-hot-loader": "^3.1.1",
95 | "redbox-react": "^1.5.0",
96 | "style-loader": "^0.19.0",
97 | "stylelint": "^8.1.1",
98 | "stylelint-config-standard": "^17.0.0",
99 | "url-loader": "^0.6.2",
100 | "webpack": "^1.15.0",
101 | "webpack-dev-middleware": "^1.12.0",
102 | "webpack-hot-middleware": "^2.19.1"
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/src/components/Video3.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | class Video3 extends React.Component {
4 | componentDidMount() {
5 | $("#jquery_jplayer_1").jPlayer({
6 | ready: function () {
7 | $(this).jPlayer("setMedia", {
8 | title: "Big Buck Bunny",
9 | m4v: "https://media.html5media.info/video.mp4",
10 | ogv: "http://www.jplayer.org/video/ogv/Big_Buck_Bunny_Trailer.ogv",
11 | webmv: "http://www.jplayer.org/video/webm/Big_Buck_Bunny_Trailer.webm",
12 | poster: "http://www.jplayer.org/video/poster/Big_Buck_Bunny_Trailer_480x270.png"
13 | }).jPlayer("play");
14 | },
15 | swfPath: "https://cdn.bootcss.com/jplayer/2.9.1/jplayer/jquery.jplayer.swf",
16 | supplied: "webmv, ogv, m4v",
17 | size: {
18 | width: "640px",
19 | height: "360px",
20 | cssClass: "jp-video-360p"
21 | },
22 | useStateClassSkin: true,
23 | autoBlur: false,
24 | smoothPlayBar: true,
25 | keyEnabled: true,
26 | remainingDuration: true,
27 | toggleDuration: true
28 | });
29 | }
30 |
31 | componentWillUnmount() {
32 | console.log('unmount')
33 | $("#jquery_jplayer_1").jPlayer("destroy")
34 | }
35 |
36 | render() {
37 | return (
38 |
39 |
40 |
41 |
42 |
43 | play
44 |
45 |
46 |
51 |
52 |
53 |
54 |
55 | play
56 | stop
57 |
58 |
59 |
mute
60 |
max volume
61 |
64 |
65 |
66 | repeat
67 | full screen
68 |
69 |
70 |
73 |
74 |
75 |
76 |
Update Required
77 | To play the media you will need to either update your browser to a recent version or update your
Flash plugin .
78 |
79 |
80 |
81 | )
82 | }
83 | }
84 |
85 | export default Video3
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path')
2 | const webpack = require('webpack')
3 | const HtmlWebpackPlugin = require('html-webpack-plugin')
4 | const ExtractTextPlugin = require('extract-text-webpack-plugin')
5 | const es3ifyPlugin = require('es3ify-webpack-plugin')
6 |
7 | const args = process.argv.slice(2)
8 | const DEBUG = !(args[0] === '--release')
9 | const VERBOSE = args[0] === '--verbose'
10 |
11 | const config = {
12 | context: path.resolve(__dirname, './src'),
13 |
14 | entry: {
15 | app: ['./main.js'],
16 | vendor: [
17 | 'es5-shim',
18 | 'es5-shim/es5-sham',
19 | 'babel-polyfill',
20 | 'es6-promise',
21 | 'react',
22 | 'react-dom',
23 | 'react-redux',
24 | 'react-router',
25 | ],
26 | },
27 |
28 | output: {
29 | path: path.resolve(__dirname, 'build'),
30 | publicPath: '/',
31 | filename: 'assets/[name].js',
32 | chunkFilename: 'assets/[name].js',
33 | sourcePrefix: ' ',
34 | },
35 | resolve: {
36 | extensions: ['', '.js', '.jsx'],
37 | alias: {
38 | components: path.resolve(__dirname, './src/components/'),
39 | routes: path.resolve(__dirname, './src/routes/'),
40 | services: path.resolve(__dirname, './src/services/'),
41 | store: path.resolve(__dirname, './src/store/'),
42 | },
43 | },
44 | debug: DEBUG,
45 | cache: DEBUG,
46 |
47 | devtool: DEBUG ? 'source-map' : false,
48 | stats: {
49 | colors: true,
50 | reasons: DEBUG,
51 | hash: VERBOSE,
52 | version: VERBOSE,
53 | timings: true,
54 | chunks: VERBOSE,
55 | chunkModules: VERBOSE,
56 | cached: VERBOSE,
57 | cachedAssets: VERBOSE,
58 | children: false,
59 | },
60 | plugins: [
61 | // new es3ifyPlugin(),
62 | new webpack.optimize.OccurenceOrderPlugin(),
63 | new webpack.optimize.CommonsChunkPlugin({
64 | name: 'vendor',
65 | minChunks: Infinity,
66 | }),
67 | new webpack.DefinePlugin({
68 | 'process.env.NODE_ENV': DEBUG ? '"development"' : '"production"',
69 | __DEV__: DEBUG,
70 | __BASENAME__: JSON.stringify(process.env.BASENAME || ''),
71 | }),
72 | new ExtractTextPlugin('assets/styles.css', {
73 | minimize: !DEBUG,
74 | allChunks: true,
75 | }),
76 | new HtmlWebpackPlugin({
77 | template: path.resolve(__dirname, './src/index.ejs'),
78 | filename: 'index.html',
79 | minify: !DEBUG
80 | ? {
81 | collapseWhitespace: true,
82 | }
83 | : null,
84 | hash: true,
85 | }),
86 | ],
87 | module: {
88 | loaders: [
89 | {
90 | test: /\.jsx?$/,
91 | include: [path.resolve(__dirname, 'src')],
92 | loader: 'babel-loader',
93 | query: {
94 | plugins: [],
95 | },
96 | },
97 | {
98 | test: /\.css/,
99 | loader: ExtractTextPlugin.extract(
100 | 'style-loader',
101 | 'css-loader?-autoprefixer&modules=true&localIdentName=[local]!postcss-loader',
102 | ),
103 | },
104 | {
105 | test: /\.less$/,
106 | loader: ExtractTextPlugin.extract(
107 | 'style-loader',
108 | 'css-loader?-autoprefixer!postcss-loader!less-loader',
109 | ),
110 | },
111 | {
112 | test: /\.json$/,
113 | loader: 'json-loader',
114 | },
115 | {
116 | test: /\.(png|jpg|jpeg|gif|svg|woff|woff2)$/,
117 | loader: 'url-loader',
118 | query: {
119 | name: 'assets/[path][name].[ext]',
120 | limit: 10000,
121 | },
122 | },
123 | {
124 | test: /\.(eot|ttf|wav|mp3|ogg)$/,
125 | loader: 'file-loader',
126 | query: {
127 | name: 'assets/[path][name].[ext]',
128 | },
129 | },
130 | ],
131 | },
132 | }
133 |
134 | if (!DEBUG) {
135 | config.plugins.push(new es3ifyPlugin())
136 | config.plugins.push(new webpack.optimize.DedupePlugin())
137 | }
138 |
139 | const uglyOptions = !DEBUG
140 | ? {
141 | compress: {
142 | warnings: VERBOSE,
143 | screw_ie8: false,
144 | },
145 | mangle: {
146 | screw_ie8: false,
147 | },
148 | output: {
149 | screw_ie8: false,
150 | },
151 | }
152 | : {
153 | mangle: false,
154 | compress: {
155 | drop_debugger: false,
156 | warnings: VERBOSE,
157 | screw_ie8: false,
158 | },
159 | output: {
160 | beautify: true,
161 | comments: true,
162 | bracketize: true,
163 | indent_level: 2,
164 | keep_quoted_props: true,
165 | screw_ie8: false,
166 | },
167 | }
168 |
169 | // config.plugins.push(new webpack.optimize.UglifyJsPlugin(uglyOptions))
170 |
171 | if (!DEBUG) {
172 | config.plugins.push(new webpack.optimize.UglifyJsPlugin(uglyOptions))
173 | config.plugins.push(new webpack.optimize.AggressiveMergingPlugin())
174 | config.module.loaders
175 | .find(x => x.loader === 'babel-loader')
176 | .query.plugins.unshift(
177 | 'transform-react-remove-prop-types',
178 | 'transform-react-constant-elements',
179 | 'transform-react-inline-elements',
180 | 'transform-es3-modules-literals',
181 | 'transform-es3-member-expression-literals',
182 | 'transform-es3-property-literals',
183 | )
184 | }
185 |
186 | module.exports = config
187 |
--------------------------------------------------------------------------------
/src/static/css/jplayer.blue.monday.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Skin for jPlayer Plugin (jQuery JavaScript Library)
3 | * http://www.jplayer.org
4 | *
5 | * Skin Name: Blue Monday
6 | *
7 | * Copyright (c) 2010 - 2014 Happyworm Ltd
8 | * Licensed under the MIT license.
9 | * - http://www.opensource.org/licenses/mit-license.php
10 | *
11 | * Author: Silvia Benvenuti
12 | * Skin Version: 5.1 (jPlayer 2.8.0)
13 | * Date: 13th November 2014
14 | */
15 |
16 | .jp-audio *:focus,
17 | .jp-audio-stream *:focus,
18 | .jp-video *:focus {
19 | /* Disable the browser focus highlighting. */
20 | outline:none;
21 | }
22 |
23 | .jp-audio button::-moz-focus-inner,
24 | .jp-audio-stream button::-moz-focus-inner,
25 | .jp-video button::-moz-focus-inner {
26 | /* Disable the browser CSS3 focus highlighting. */
27 | border: 0;
28 | }
29 |
30 | .jp-audio,
31 | .jp-audio-stream,
32 | .jp-video {
33 |
34 | font-size:16px;
35 |
36 | font-family:Verdana, Arial, sans-serif;
37 | line-height:1.6;
38 | color: #666;
39 | border:1px solid #009be3;
40 | background-color:#eee;
41 | }
42 | .jp-audio {
43 | width:420px;
44 | }
45 | .jp-audio-stream {
46 | width:182px;
47 | }
48 | .jp-video-270p {
49 | width:480px;
50 | }
51 | .jp-video-360p {
52 | width:640px;
53 | }
54 | .jp-video-full {
55 | /* Rules for IE6 (full-screen) */
56 | width:480px;
57 | height:270px;
58 | /* Rules for IE7 (full-screen) - Otherwise the relative container causes other page items that are not position:static (default) to appear over the video/gui. */
59 | position:static !important; position:relative;
60 | }
61 |
62 | /* The z-index rule is defined in this manner to enable Popcorn plugins that add overlays to video area. EG. Subtitles. */
63 | .jp-video-full div div {
64 | z-index:1000;
65 | }
66 |
67 | .jp-video-full .jp-jplayer {
68 | top: 0;
69 | left: 0;
70 | position: fixed !important; position: relative; /* Rules for IE6 (full-screen) */
71 | overflow: hidden;
72 | }
73 |
74 | .jp-video-full .jp-gui {
75 | position: fixed !important; position: static; /* Rules for IE6 (full-screen) */
76 | top: 0;
77 | left: 0;
78 | width:100%;
79 | height:100%;
80 | z-index:1001; /* 1 layer above the others. */
81 | }
82 |
83 | .jp-video-full .jp-interface {
84 | position: absolute !important; position: relative; /* Rules for IE6 (full-screen) */
85 | bottom: 0;
86 | left: 0;
87 | }
88 |
89 | .jp-interface {
90 | position: relative;
91 | background-color:#eee;
92 | width:100%;
93 | }
94 |
95 | .jp-audio .jp-interface {
96 | height:80px;
97 | }
98 |
99 | .jp-audio-stream .jp-interface {
100 | height:80px;
101 | }
102 |
103 | .jp-video .jp-interface {
104 | border-top:1px solid #009be3;
105 | }
106 |
107 | /* @group CONTROLS */
108 |
109 | .jp-controls-holder {
110 | clear: both;
111 | width:440px;
112 | margin:0 auto;
113 | position: relative;
114 | overflow:hidden;
115 | top:-8px; /* This negative value depends on the size of the text in jp-currentTime and jp-duration */
116 | }
117 |
118 | .jp-interface .jp-controls {
119 | margin:0;
120 | padding: 0;
121 | overflow:hidden;
122 | }
123 |
124 | .jp-audio .jp-controls {
125 | width: 380px;
126 | padding:20px 20px 0 20px;
127 | }
128 |
129 | .jp-audio-stream .jp-controls {
130 | position:absolute;
131 | top:20px;
132 | left:20px;
133 | width:142px;
134 | }
135 |
136 | .jp-video .jp-type-single .jp-controls {
137 | width: 78px;
138 | margin-left: 200px;
139 | }
140 |
141 | .jp-video .jp-type-playlist .jp-controls {
142 | width: 134px;
143 | margin-left: 172px;
144 | }
145 | .jp-video .jp-controls {
146 | float: left;
147 | }
148 |
149 | .jp-controls button {
150 | display:block;
151 | float: left;
152 | overflow:hidden;
153 | text-indent:-9999px;
154 | border:none;
155 | cursor:pointer;
156 | }
157 | .jp-play {
158 | width:40px;
159 | height:40px;
160 | }
161 |
162 | .jp-play {
163 | background: url("../image/jplayer.blue.monday.jpg") 0 0 no-repeat;
164 | }
165 | .jp-play:focus {
166 | background: url("../image/jplayer.blue.monday.jpg") -41px 0 no-repeat;
167 | }
168 | .jp-state-playing .jp-play {
169 | background: url("../image/jplayer.blue.monday.jpg") 0 -42px no-repeat;
170 | }
171 | .jp-state-playing .jp-play:focus {
172 | background: url("../image/jplayer.blue.monday.jpg") -41px -42px no-repeat;
173 | }
174 |
175 | .jp-stop, .jp-previous, .jp-next {
176 | width:28px;
177 | height:28px;
178 | margin-top:6px;
179 | }
180 |
181 | .jp-stop {
182 | background: url("../image/jplayer.blue.monday.jpg") 0 -83px no-repeat;
183 | margin-left:10px;
184 | }
185 |
186 | .jp-stop:focus {
187 | background: url("../image/jplayer.blue.monday.jpg") -29px -83px no-repeat;
188 | }
189 |
190 | .jp-previous {
191 | background: url("../image/jplayer.blue.monday.jpg") 0 -112px no-repeat;
192 | }
193 | .jp-previous:focus {
194 | background: url("../image/jplayer.blue.monday.jpg") -29px -112px no-repeat;
195 | }
196 |
197 | .jp-next {
198 | background: url("../image/jplayer.blue.monday.jpg") 0 -141px no-repeat;
199 | }
200 | .jp-next:focus {
201 | background: url("../image/jplayer.blue.monday.jpg") -29px -141px no-repeat;
202 | }
203 |
204 | /* @end */
205 |
206 | /* @group progress bar */
207 |
208 | .jp-progress {
209 | overflow:hidden;
210 | background-color: #ddd;
211 | }
212 | .jp-audio .jp-progress {
213 | position: absolute;
214 | top:32px;
215 | height:15px;
216 | }
217 | .jp-audio .jp-type-single .jp-progress {
218 | left:110px;
219 | width:186px;
220 | }
221 | .jp-audio .jp-type-playlist .jp-progress {
222 | left:166px;
223 | width:130px;
224 | }
225 | .jp-video .jp-progress {
226 | top:0px;
227 | left:0px;
228 | width:100%;
229 | height:10px;
230 | }
231 | .jp-seek-bar {
232 | background: url("../image/jplayer.blue.monday.jpg") 0 -202px repeat-x;
233 | width:0px;
234 | height:100%;
235 | cursor: pointer;
236 | }
237 | .jp-play-bar {
238 | background: url("../image/jplayer.blue.monday.jpg") 0 -218px repeat-x ;
239 | width:0px;
240 | height:100%;
241 | }
242 |
243 | /* The seeking class is added/removed inside jPlayer */
244 | .jp-seeking-bg {
245 | background: url("../image/jplayer.blue.monday.seeking.gif");
246 | }
247 |
248 | /* @end */
249 |
250 | /* @group volume controls */
251 |
252 | .jp-state-no-volume .jp-volume-controls {
253 | display:none;
254 | }
255 |
256 | .jp-volume-controls {
257 | position:absolute;
258 | top:32px;
259 | left:308px;
260 | width:200px;
261 | }
262 | .jp-audio-stream .jp-volume-controls {
263 | left:70px;
264 | }
265 | .jp-video .jp-volume-controls {
266 | top:12px;
267 | left:50px;
268 | }
269 |
270 | .jp-volume-controls button {
271 | display:block;
272 | position: absolute;
273 | overflow:hidden;
274 | text-indent:-9999px;
275 | border:none;
276 | cursor:pointer;
277 | }
278 |
279 | .jp-mute,
280 | .jp-volume-max {
281 | width:18px;
282 | height:15px;
283 | }
284 | .jp-volume-max {
285 | left:74px;
286 | }
287 |
288 | .jp-mute {
289 | background: url("../image/jplayer.blue.monday.jpg") 0 -170px no-repeat;
290 | }
291 | .jp-mute:focus {
292 | background: url("../image/jplayer.blue.monday.jpg") -19px -170px no-repeat;
293 | }
294 | .jp-state-muted .jp-mute {
295 | background: url("../image/jplayer.blue.monday.jpg") -60px -170px no-repeat;
296 | }
297 | .jp-state-muted .jp-mute:focus {
298 | background: url("../image/jplayer.blue.monday.jpg") -79px -170px no-repeat;
299 | }
300 | .jp-volume-max {
301 | background: url("../image/jplayer.blue.monday.jpg") 0 -186px no-repeat;
302 | }
303 | .jp-volume-max:focus {
304 | background: url("../image/jplayer.blue.monday.jpg") -19px -186px no-repeat;
305 | }
306 |
307 | .jp-volume-bar {
308 | position: absolute;
309 | overflow:hidden;
310 | background: url("../image/jplayer.blue.monday.jpg") 0 -250px repeat-x;
311 | top:5px;
312 | left:22px;
313 | width:46px;
314 | height:5px;
315 | cursor: pointer;
316 | }
317 | .jp-volume-bar-value {
318 | background: url("../image/jplayer.blue.monday.jpg") 0 -256px repeat-x;
319 | width:0px;
320 | height:5px;
321 | }
322 |
323 | /* @end */
324 |
325 | /* @group current time and duration */
326 |
327 | .jp-audio .jp-time-holder {
328 | position:absolute;
329 | top:50px;
330 | }
331 | .jp-audio .jp-type-single .jp-time-holder {
332 | left:110px;
333 | width:186px;
334 | }
335 | .jp-audio .jp-type-playlist .jp-time-holder {
336 | left:166px;
337 | width:130px;
338 | }
339 |
340 | .jp-current-time,
341 | .jp-duration {
342 | width:60px;
343 | font-size:.64em;
344 | font-style:oblique;
345 | }
346 | .jp-current-time {
347 | float: left;
348 | display:inline;
349 | cursor:default;
350 | }
351 | .jp-duration {
352 | float: right;
353 | display:inline;
354 | text-align: right;
355 | cursor:pointer;
356 | }
357 |
358 | .jp-video .jp-current-time {
359 | margin-left:20px;
360 | }
361 | .jp-video .jp-duration {
362 | margin-right:20px;
363 | }
364 |
365 | /* @end */
366 |
367 | /* @group playlist */
368 |
369 | .jp-details {
370 | font-weight:bold;
371 | text-align:center;
372 | cursor:default;
373 | }
374 |
375 | .jp-details,
376 | .jp-playlist {
377 | width:100%;
378 | background-color:#ccc;
379 | border-top:1px solid #009be3;
380 | }
381 |
382 | .jp-type-single .jp-details,
383 | .jp-type-playlist .jp-details {
384 | border-top:none;
385 | }
386 |
387 | .jp-details .jp-title {
388 | margin:0;
389 | padding:5px 20px;
390 | font-size:.72em;
391 | font-weight:bold;
392 | }
393 |
394 | .jp-playlist ul {
395 | list-style-type:none;
396 | margin:0;
397 | padding:0 20px;
398 | font-size:.72em;
399 | }
400 | .jp-playlist li {
401 | padding:5px 0 4px 20px;
402 | border-bottom:1px solid #eee;
403 | }
404 | .jp-playlist li div {
405 | display:inline;
406 | }
407 |
408 | /* Note that the first-child (IE6) and last-child (IE6/7/8) selectors do not work on IE */
409 |
410 | div.jp-type-playlist div.jp-playlist li:last-child {
411 | padding:5px 0 5px 20px;
412 | border-bottom:none;
413 | }
414 | div.jp-type-playlist div.jp-playlist li.jp-playlist-current {
415 | list-style-type:square;
416 | list-style-position:inside;
417 | padding-left:7px;
418 | }
419 | div.jp-type-playlist div.jp-playlist a {
420 | color: #333;
421 | text-decoration: none;
422 | }
423 | div.jp-type-playlist div.jp-playlist a:hover {
424 | color:#0d88c1;
425 | }
426 | div.jp-type-playlist div.jp-playlist a.jp-playlist-current {
427 | color:#0d88c1;
428 | }
429 |
430 | div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove {
431 | float:right;
432 | display:inline;
433 | text-align:right;
434 | margin-right:10px;
435 | font-weight:bold;
436 | color:#666;
437 | }
438 | div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove:hover {
439 | color:#0d88c1;
440 | }
441 | div.jp-type-playlist div.jp-playlist span.jp-free-media {
442 | float:right;
443 | display:inline;
444 | text-align:right;
445 | margin-right:10px;
446 | }
447 | div.jp-type-playlist div.jp-playlist span.jp-free-media a{
448 | color:#666;
449 | }
450 | div.jp-type-playlist div.jp-playlist span.jp-free-media a:hover{
451 | color:#0d88c1;
452 | }
453 | span.jp-artist {
454 | font-size:.8em;
455 | color:#666;
456 | }
457 |
458 | /* @end */
459 |
460 | .jp-video-play {
461 | width:100%;
462 | overflow:hidden; /* Important for nested negative margins to work in modern browsers */
463 | cursor:pointer;
464 | background-color:rgba(0,0,0,0); /* Makes IE9 work with the active area over the whole video area. IE6/7/8 only have the button as active area. */
465 | }
466 | .jp-video-270p .jp-video-play {
467 | margin-top:-270px;
468 | height:270px;
469 | }
470 | .jp-video-360p .jp-video-play {
471 | margin-top:-360px;
472 | height:360px;
473 | }
474 | .jp-video-full .jp-video-play {
475 | height:100%;
476 | }
477 | .jp-video-play-icon {
478 | position:relative;
479 | display:block;
480 | width: 112px;
481 | height: 100px;
482 |
483 | margin-left:-56px;
484 | margin-top:-50px;
485 | left:50%;
486 | top:50%;
487 |
488 | background: url("../image/jplayer.blue.monday.video.play.png") 0 0 no-repeat;
489 | text-indent:-9999px;
490 | border:none;
491 | cursor:pointer;
492 | }
493 | .jp-video-play-icon:focus {
494 | background: url("../image/jplayer.blue.monday.video.play.png") 0 -100px no-repeat;
495 | }
496 |
497 |
498 | .jp-jplayer audio,
499 | .jp-jplayer {
500 | width:0px;
501 | height:0px;
502 | }
503 |
504 | .jp-jplayer {
505 | background-color: #000000;
506 | }
507 |
508 |
509 |
510 | /* @group TOGGLES */
511 |
512 | /* The audio toggles are nested inside jp-time-holder */
513 |
514 | .jp-toggles {
515 | padding:0;
516 | margin:0 auto;
517 | overflow:hidden;
518 | }
519 |
520 | .jp-audio .jp-type-single .jp-toggles {
521 | width:25px;
522 | }
523 | .jp-audio .jp-type-playlist .jp-toggles {
524 | width:55px;
525 | margin: 0;
526 | position: absolute;
527 | left: 325px;
528 | top: 50px;
529 | }
530 |
531 | .jp-video .jp-toggles {
532 | position:absolute;
533 | right:16px;
534 | margin:0;
535 | margin-top:10px;
536 | width:100px;
537 | }
538 |
539 | .jp-toggles button {
540 | display:block;
541 | float:left;
542 | width:25px;
543 | height:18px;
544 | text-indent:-9999px;
545 | line-height:100%; /* need this for IE6 */
546 | border:none;
547 | cursor:pointer;
548 | }
549 |
550 | .jp-full-screen {
551 | background: url("../image/jplayer.blue.monday.jpg") 0 -310px no-repeat;
552 | margin-left: 20px;
553 | }
554 |
555 | .jp-full-screen:focus {
556 | background: url("../image/jplayer.blue.monday.jpg") -30px -310px no-repeat;
557 | }
558 |
559 | .jp-state-full-screen .jp-full-screen {
560 | background: url("../image/jplayer.blue.monday.jpg") -60px -310px no-repeat;
561 | }
562 |
563 | .jp-state-full-screen .jp-full-screen:focus {
564 | background: url("../image/jplayer.blue.monday.jpg") -90px -310px no-repeat;
565 | }
566 |
567 | .jp-repeat {
568 | background: url("../image/jplayer.blue.monday.jpg") 0 -290px no-repeat;
569 | }
570 |
571 | .jp-repeat:focus {
572 | background: url("../image/jplayer.blue.monday.jpg") -30px -290px no-repeat;
573 | }
574 |
575 | .jp-state-looped .jp-repeat {
576 | background: url("../image/jplayer.blue.monday.jpg") -60px -290px no-repeat;
577 | }
578 |
579 | .jp-state-looped .jp-repeat:focus {
580 | background: url("../image/jplayer.blue.monday.jpg") -90px -290px no-repeat;
581 | }
582 |
583 | .jp-shuffle {
584 | background: url("../image/jplayer.blue.monday.jpg") 0 -270px no-repeat;
585 | margin-left: 5px;
586 | }
587 |
588 | .jp-shuffle:focus {
589 | background: url("../image/jplayer.blue.monday.jpg") -30px -270px no-repeat;
590 | }
591 |
592 | .jp-state-shuffled .jp-shuffle {
593 | background: url("../image/jplayer.blue.monday.jpg") -60px -270px no-repeat;
594 | }
595 |
596 | .jp-state-shuffled .jp-shuffle:focus {
597 | background: url("../image/jplayer.blue.monday.jpg") -90px -270px no-repeat;
598 | }
599 |
600 |
601 | /* @end */
602 |
603 | /* @group NO SOLUTION error feedback */
604 |
605 | .jp-no-solution {
606 | padding:5px;
607 | font-size:.8em;
608 | background-color:#eee;
609 | border:2px solid #009be3;
610 | color:#000;
611 | display:none;
612 | }
613 |
614 | .jp-no-solution a {
615 | color:#000;
616 | }
617 |
618 | .jp-no-solution span {
619 | font-size:1em;
620 | display:block;
621 | text-align:center;
622 | font-weight:bold;
623 | }
624 |
625 | /* @end */
626 |
--------------------------------------------------------------------------------
/src/static/iframe/player.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
59 |
60 |
61 |
62 |
63 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
471 |
472 |
473 |
474 |
475 |
--------------------------------------------------------------------------------
/src/static/js/html5media.js:
--------------------------------------------------------------------------------
1 | /*
2 | * flowplayer.js 3.2.6. The Flowplayer API
3 | *
4 | * Copyright 2009-2011 Flowplayer Oy
5 | *
6 | * This file is part of Flowplayer.
7 | *
8 | * Flowplayer is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * Flowplayer is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with Flowplayer. If not, see .
20 | *
21 | * Date: 2011-02-04 05:45:28 -0500 (Fri, 04 Feb 2011)
22 | * Revision: 614
23 | */
24 | (function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}function k(q){if(!q||typeof q!="object"){return q}var o=new q.constructor();for(var p in q){if(q.hasOwnProperty(p)){o[p]=k(q[p])}}return o}function m(t,q){if(!t){return}var o,p=0,r=t.length;if(r===undefined){for(o in t){if(q.call(t[o],o,t[o])===false){break}}}else{for(var s=t[0];p1){var t=arguments[1],q=(arguments.length==3)?arguments[2]:{};if(typeof t=="string"){t={src:t}}t=i({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:false},t);if(typeof o=="string"){if(o.indexOf(".")!=-1){var s=[];m(n(o),function(){s.push(new b(this,k(t),k(q)))});return new d(s)}else{var r=c(o);return new b(r!==null?r:o,t,q)}}else{if(o){return new b(o,t,q)}}}return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r){o.push(r)}});return arguments.length?o[arguments[0]]:new d(o)}return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var e=typeof jQuery=="function";var i={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(e){jQuery.tools=jQuery.tools||{};jQuery.tools.flashembed={version:"1.0.4",conf:i}}function j(){if(c.done){return false}var l=document;if(l&&l.getElementsByTagName&&l.getElementById&&l.body){clearInterval(c.timer);c.timer=null;for(var k=0;k";if(q.w3c||s){n+=' '}q.width=q.height=q.id=q.w3c=q.src=null;for(var l in q){if(q[l]!==null){n+=' '}}var o="";if(t){for(var m in t){if(t[m]!==null){o+=m+"="+(typeof t[m]=="object"?g(t[m]):t[m])+"&"}}o=o.substring(0,o.length-1);n+=' "}n+="";return n}function d(m,p,l){var k=flashembed.getVersion();f(this,{getContainer:function(){return m},getConf:function(){return p},getVersion:function(){return k},getFlashvars:function(){return l},getApi:function(){return m.firstChild},getHTML:function(){return a(p,l)}});var q=p.version;var r=p.expressInstall;var o=!q||flashembed.isSupported(q);if(o){p.onFail=p.version=p.expressInstall=null;m.innerHTML=a(p,l)}else{if(q&&r&&flashembed.isSupported([6,65])){f(p,{src:r});l={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};m.innerHTML=a(p,l)}else{if(m.innerHTML.replace(/\s/g,"")!==""){}else{m.innerHTML="Flash version "+q+" or greater is required "+(k[0]>0?"Your version is "+k:"You have no flash plugin installed")+" "+(m.tagName=="A"?"Click here to download latest version
":"Download latest version from here
");if(m.tagName=="A"){m.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"}}}}}if(!o&&p.onFail){var n=p.onFail.call(this);if(typeof n=="string"){m.innerHTML=n}}if(document.all){window[p.id]=document.getElementById(p.id)}}window.flashembed=function(l,m,k){if(typeof l=="string"){var n=document.getElementById(l);if(n){l=n}else{c(function(){flashembed(l,m,k)});return}}if(!l){return}if(typeof m=="string"){m={src:m}}var o=f({},i);f(o,m);return new d(l,o,k)};f(window.flashembed,{getVersion:function(){var m=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var l=navigator.plugins["Shockwave Flash"].description;if(typeof l!="undefined"){l=l.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var n=parseInt(l.replace(/^(.*)\..*$/,"$1"),10);var r=/r/.test(l)?parseInt(l.replace(/^.*r(.*)$/,"$1"),10):0;m=[n,r]}}else{if(window.ActiveXObject){try{var p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(q){try{p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");m=[6,0];p.AllowScriptAccess="always"}catch(k){if(m[0]==6){return m}}try{p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(o){}}if(typeof p=="object"){l=p.GetVariable("$version");if(typeof l!="undefined"){l=l.replace(/^\S+\s+(.*)$/,"$1").split(",");m=[parseInt(l[0],10),parseInt(l[2],10)]}}}}return m},isSupported:function(k){var m=flashembed.getVersion();var l=(m[0]>k[0])||(m[0]==k[0]&&m[1]>=k[1]);return l},domReady:c,asString:g,getHTML:a});if(e){jQuery.fn.flashembed=function(l,k){var m=null;this.each(function(){m=flashembed(this,l,k)});return l.api===false?this:m}}})();
25 | (function(){
26 |
27 | var DomReady = window.DomReady = {};
28 |
29 | // Everything that has to do with properly supporting our document ready event. Brought over from the most awesome jQuery.
30 |
31 | var userAgent = navigator.userAgent.toLowerCase();
32 |
33 | // Figure out what browser is being used
34 | var browser = {
35 | version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1],
36 | safari: /webkit/.test(userAgent),
37 | opera: /opera/.test(userAgent),
38 | msie: (/msie/.test(userAgent)) && (!/opera/.test( userAgent )),
39 | mozilla: (/mozilla/.test(userAgent)) && (!/(compatible|webkit)/.test(userAgent))
40 | };
41 |
42 | var readyBound = false;
43 | var isReady = false;
44 | var readyList = [];
45 |
46 | // Handle when the DOM is ready
47 | function domReady() {
48 | // Make sure that the DOM is not already loaded
49 | if(!isReady) {
50 | // Remember that the DOM is ready
51 | isReady = true;
52 |
53 | if(readyList) {
54 | for(var fn = 0; fn < readyList.length; fn++) {
55 | readyList[fn].call(window, []);
56 | }
57 |
58 | readyList = [];
59 | }
60 | }
61 | };
62 |
63 | // From Simon Willison. A safe way to fire onload w/o screwing up everyone else.
64 | function addLoadEvent(func) {
65 | var oldonload = window.onload;
66 | if (typeof window.onload != 'function') {
67 | window.onload = func;
68 | } else {
69 | window.onload = function() {
70 | if (oldonload) {
71 | oldonload();
72 | }
73 | func();
74 | }
75 | }
76 | };
77 |
78 | // does the heavy work of working through the browsers idiosyncracies (let's call them that) to hook onload.
79 | function bindReady() {
80 | if(readyBound) {
81 | return;
82 | }
83 |
84 | readyBound = true;
85 |
86 | // Mozilla, Opera (see further below for it) and webkit nightlies currently support this event
87 | if (document.addEventListener && !browser.opera) {
88 | // Use the handy event callback
89 | document.addEventListener("DOMContentLoaded", domReady, false);
90 | }
91 |
92 | // If IE is used and is not in a frame
93 | // Continually check to see if the document is ready
94 | if (browser.msie && window == top) (function(){
95 | if (isReady) return;
96 | try {
97 | // If IE is used, use the trick by Diego Perini
98 | // http://javascript.nwbox.com/IEContentLoaded/
99 | document.documentElement.doScroll("left");
100 | } catch(error) {
101 | setTimeout(arguments.callee, 0);
102 | return;
103 | }
104 | // and execute any waiting functions
105 | domReady();
106 | })();
107 |
108 | if(browser.opera) {
109 | document.addEventListener( "DOMContentLoaded", function () {
110 | if (isReady) return;
111 | for (var i = 0; i < document.styleSheets.length; i++)
112 | if (document.styleSheets[i].disabled) {
113 | setTimeout( arguments.callee, 0 );
114 | return;
115 | }
116 | // and execute any waiting functions
117 | domReady();
118 | }, false);
119 | }
120 |
121 | if(browser.safari) {
122 | var numStyles;
123 | (function(){
124 | if (isReady) return;
125 | if (document.readyState != "loaded" && document.readyState != "complete") {
126 | setTimeout( arguments.callee, 0 );
127 | return;
128 | }
129 | if (numStyles === undefined) {
130 | var links = document.getElementsByTagName("link");
131 | for (var i=0; i < links.length; i++) {
132 | if(links[i].getAttribute('rel') == 'stylesheet') {
133 | numStyles++;
134 | }
135 | }
136 | var styles = document.getElementsByTagName("style");
137 | numStyles += styles.length;
138 | }
139 | if (document.styleSheets.length != numStyles) {
140 | setTimeout( arguments.callee, 0 );
141 | return;
142 | }
143 |
144 | // and execute any waiting functions
145 | domReady();
146 | })();
147 | }
148 |
149 | // A fallback to window.onload, that will always work
150 | addLoadEvent(domReady);
151 | };
152 |
153 | // This is the public function that people can use to hook up ready.
154 | DomReady.ready = function(fn, args) {
155 | // Attach the listeners
156 | bindReady();
157 |
158 | // If the DOM is already ready
159 | if (isReady) {
160 | // Execute the function immediately
161 | fn.call(window, []);
162 | } else {
163 | // Add the function to the wait list
164 | readyList.push( function() { return fn.call(window, []); } );
165 | }
166 | };
167 |
168 | bindReady();
169 |
170 | })();
171 | /*
172 | * HTML 5 media compatibility layer.
173 | *
174 | * Copyright 2010 Dave Hall .
175 | *
176 | * This script is part of the html5media project. The html5media project enables
177 | * HTML5 video and audio tags in all major browsers.
178 | *
179 | * The html5media project is free software: you can redistribute it and/or
180 | * modify it under the terms of the GNU General Public License as published by
181 | * the Free Software Foundation, either version 3 of the License, or (at your
182 | * option) any later version.
183 | *
184 | * The html5media project is distributed in the hope that it will be useful,
185 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
186 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
187 | * Public License for more details.
188 | *
189 | * You should have received a copy of the GNU General Public License
190 | * along with html5media. If not, see .
191 | *
192 | * Developed by Dave Hall.
193 | *
194 | *
195 | */
196 |
197 |
198 | (function(window, document, undefined) {
199 |
200 | "use strict";
201 |
202 | // Tagnames for the different types of media tag.
203 | var VIDEO_TAG = "video";
204 | var AUDIO_TAG = "audio";
205 |
206 | // If no video tag is supported, go ahead and enable all HTML5 elements.
207 | if (!document.createElement(VIDEO_TAG).canPlayType) {
208 | document.createElement(AUDIO_TAG);
209 | document.createElement("source");
210 | }
211 |
212 | // Checks whether this is a broken Android implementation.
213 | var isBrokenAndroid = window.navigator.userAgent.toLowerCase().match(/android 2\.[12]/) !== null;
214 |
215 | // Checks if this is opera.
216 | var isOpera = window.navigator.userAgent.toLowerCase().match(/opera/) !== null;
217 |
218 | // Checks whether the given element can play the fiven format.
219 | function canPlayFormat(element, format) {
220 | return element.canPlayType(format) || (isBrokenAndroid && format.search("mp4") > -1);
221 | }
222 |
223 | // Scans over elements with the given tag name, creating fallbacks if required.
224 | function scanElementsByTagName(tagName) {
225 | var elements = document.getElementsByTagName(tagName);
226 | var elementsList = [];
227 | for (var n = 0; n < elements.length; n++) {
228 | elementsList.push(elements[n]);
229 | }
230 | for (n = 0; n < elementsList.length; n++) {
231 | var element = elementsList[n];
232 | var requiresFallback = true;
233 | // Test if the media tag is supported.
234 | if (element.canPlayType) {
235 | // If the media has a src attribute, and can play it, then all is good.
236 | if (element.src) {
237 | if (canPlayFormat(element, guessFormat(tagName, element.src))) {
238 | requiresFallback = false;
239 | }
240 | } else {
241 | // Check for source child attributes.
242 | var sources = element.getElementsByTagName("source");
243 | for (var m = 0; m < sources.length; m++) {
244 | var source = sources[m];
245 | if (canPlayFormat(element, guessFormat(tagName, source.src, source.type))) {
246 | requiresFallback = false;
247 | break;
248 | }
249 | }
250 | }
251 | }
252 | // If cannot play media, create the fallback.
253 | if (requiresFallback || html5media.forceFallback(tagName, element)) {
254 | html5media.createFallback(tagName, element);
255 | } else {
256 | // HACK: Enables playback in android phones.
257 | if (isBrokenAndroid) {
258 | element.addEventListener("click", function() {
259 | this.play();
260 | }, false);
261 | }
262 | }
263 | }
264 | }
265 |
266 | /**
267 | * Replaces all video tags with flowplayer video player if the browser does
268 | * not support either the video tag the h.264 codex.
269 | *
270 | * This is run automatically on document ready, but can be run manually
271 | * again after dynamically creating HTML5 video tags.
272 | */
273 | function html5media() {
274 | scanElementsByTagName("video");
275 | scanElementsByTagName("audio");
276 | }
277 |
278 | /**
279 | * Callback to allow conditional forcing of the fallback player.
280 | *
281 | * Return true to force the flash fallback. The default implementation never
282 | * forces the flash fallback.
283 | */
284 | html5media.forceFallback = function(tagName, element) {
285 | return false;
286 | };
287 |
288 | // Removes the final filename from the given path.
289 | function dirname(path) {
290 | return path.split("/").slice(0, -1).join("/") + "/";
291 | }
292 |
293 | /**
294 | * The locations of the flowplayer and flowplayer controls SWF files.
295 | *
296 | * Override this if they are not located in the same folder as the
297 | */
298 | var scriptRoot = (function() {
299 | var scripts = document.getElementsByTagName("script");
300 | for (var n = 0; n < scripts.length; n++) {
301 | var script = scripts[n];
302 | if (script.src.match(/html5media(\.min|)\.js/)) {
303 | return dirname(script.src);
304 | }
305 | }
306 | return "";
307 | }());
308 | html5media.flowplayerSwf = scriptRoot + "flowplayer.swf";
309 | html5media.flowplayerAudioSwf = scriptRoot + "flowplayer.audio.swf";
310 | html5media.flowplayerControlsSwf = scriptRoot + "flowplayer.controls.swf";
311 | html5media.expressInstallSwf = scriptRoot + "expressInstall.swf";
312 |
313 | // Known media formats.
314 | var THEORA_FORMAT = 'video/ogg; codecs="theora, vorbis"';
315 | var H264_FORMAT = 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"';
316 | var VORBIS_FORMAT = 'audio/ogg; codecs="vorbis"';
317 | var WEBM_FORMAT = 'video/webm;';
318 | var M4A_FORMAT = 'audio/x-m4a;';
319 | var MP3_FORMAT = 'audio/mpeg;';
320 | var WAV_FORMAT = 'audio/wav; codecs="1"';
321 |
322 | /**
323 | * The video format to assume if it cannot be determined what format a media
324 | * file is.
325 | */
326 | var assumedFormats = {
327 | video: H264_FORMAT,
328 | audio: MP3_FORMAT
329 | };
330 |
331 | /**
332 | * Formats that the fallback Flash player is able to understand.
333 | */
334 | var fallbackFormats = [H264_FORMAT, M4A_FORMAT, MP3_FORMAT];
335 |
336 | /**
337 | * Known file extensions that can be used to guess media formats in the
338 | * absence of other information.
339 | */
340 | var fileExtensions = {
341 | video: {
342 | "ogg": THEORA_FORMAT,
343 | "ogv": THEORA_FORMAT,
344 | "avi": H264_FORMAT,
345 | "mp4": H264_FORMAT,
346 | "mkv": H264_FORMAT,
347 | "h264": H264_FORMAT,
348 | "264": H264_FORMAT,
349 | "avc": H264_FORMAT,
350 | "m4v": H264_FORMAT,
351 | "3gp": H264_FORMAT,
352 | "3gpp": H264_FORMAT,
353 | "3g2": H264_FORMAT,
354 | "mpg": H264_FORMAT,
355 | "mpeg": H264_FORMAT,
356 | "webm": WEBM_FORMAT
357 | },
358 | audio: {
359 | "ogg": VORBIS_FORMAT,
360 | "oga": VORBIS_FORMAT,
361 | "aac": M4A_FORMAT,
362 | "m4a": M4A_FORMAT,
363 | "mp3": MP3_FORMAT,
364 | "wav": WAV_FORMAT
365 | }
366 | };
367 |
368 | // Trys to determine the format of a given video file.
369 | function guessFormat(tag, src, type) {
370 | // An explicit type is always best.
371 | if (type) {
372 | return type;
373 | }
374 | // Try to match based on file extension.
375 | var extensionMatch = (/\.([a-z1-9]+)(\?|#|\s|$)/i).exec(src);
376 | if (extensionMatch) {
377 | var format = fileExtensions[tag][extensionMatch[1]];
378 | if (format) {
379 | return format;
380 | }
381 | }
382 | return assumedFormats[tag];
383 | }
384 |
385 | // Detects presence of HTML5 attributes.
386 | function hasAttr(element, attr) {
387 | var val = element.getAttribute(attr);
388 | return !!val || typeof val == "string";
389 | }
390 |
391 | // Standardizes URLs to avoid confusing Flowplayer.
392 | function fixPath(url) {
393 | var link = document.createElement("a");
394 | link.href = url;
395 | return link.href;
396 | }
397 |
398 | // Calculates the given dimension of the given element.
399 | function getDimension(element, dimension, fallback) {
400 | // Attempt to use it's attribute value.
401 | var result = element.getAttribute(dimension);
402 | if (result) {
403 | return result + "px";
404 | }
405 | // Attempt to use it's computed style.
406 | var style;
407 | if (element.currentStyle) {
408 | style = element.currentStyle[dimension];
409 | } else if (window.getComputedStyle) {
410 | style = document.defaultView.getComputedStyle(element, null).getPropertyValue(dimension);
411 | } else {
412 | return fallback;
413 | }
414 | if (style == "auto") {
415 | return fallback;
416 | }
417 | return style;
418 | }
419 |
420 | // Extracts the mimetype from a format string.
421 | function getMimeType(format) {
422 | return format.match(/\s*([\w-]+\/[\w-]+)(;|\s|$)/)[1];
423 | }
424 |
425 | // Checks whether the two formats are equivalent.
426 | function formatMatches(format1, format2) {
427 | return (getMimeType(format1) == getMimeType(format2));
428 | }
429 |
430 | /**
431 | * Callback for adding custom configuration options to Flowplayer before it
432 | * launches. This callback is supplied with the tagname of the element being
433 | * replaced ("video" or "audio"), the element being replaced, and the
434 | * generated Flowplayer configuration.
435 | *
436 | * This callback should return the updated Flowplayer configuration. By
437 | * The default implementation leaves the generated configuration intact.
438 | */
439 | html5media.configureFlowplayer = function(element, config) {
440 | return config;
441 | };
442 |
443 | /**
444 | * Default callback for creating a fallback for html5 media tags.
445 | *
446 | * This implementation creates flowplayer instances, but this can
447 | * theoretically be used to support all different types of flash player.
448 | */
449 | html5media.createFallback = function(tagName, element) {
450 | var hasControls = hasAttr(element, "controls");
451 | // Standardize the src and poster.
452 | var poster = element.getAttribute("poster") || "";
453 | var src = element.getAttribute("src") || "";
454 | if (!src) {
455 | // Find a compatible fallback file.
456 | var sources = element.getElementsByTagName("source");
457 | for (var sn = 0; sn < sources.length; sn++) {
458 | var source = sources[sn];
459 | var srcValue = source.getAttribute("src");
460 | if (srcValue) {
461 | for (var fn = 0; fn < fallbackFormats.length; fn++) {
462 | var fallbackFormat = fallbackFormats[fn];
463 | if (formatMatches(fallbackFormat, guessFormat(tagName, srcValue, source.getAttribute("type")))) {
464 | src = srcValue;
465 | break;
466 | }
467 | }
468 | }
469 | if (src) {
470 | break;
471 | }
472 | }
473 | }
474 | // If there is no src, then fail silently for now.
475 | if (!src) {
476 | return;
477 | }
478 | // Create the replacement element div.
479 | var replacement = document.createElement("span");
480 | replacement.id = element.id;
481 | replacement.style.cssText = element.style.cssText;
482 | replacement.className = element.className;
483 | replacement.title = element.title;
484 | replacement.style.display = "block";
485 | replacement.style.width = getDimension(element, "width", "300px");
486 | if (tagName == "audio") {
487 | replacement.style.height = "26px";
488 | } else {
489 | replacement.style.height = getDimension(element, "height", "200px");
490 | }
491 | // Replace the element with the div.
492 | element.parentNode.replaceChild(replacement, element);
493 | var preload = (element.getAttribute("preload") || "").toLowerCase();
494 | // Activate flowplayer.
495 | var playlist = [];
496 | if (poster) {
497 | playlist.push({url: fixPath(poster)});
498 | }
499 | if (src) {
500 | playlist.push({
501 | url: fixPath(src),
502 | autoPlay: hasAttr(element, "autoplay"),
503 | autoBuffering: hasAttr(element, "autobuffer") || (hasAttr(element, "preload") && (preload === "" || preload == "auto")),
504 | onBeforeFinish: function() {
505 | return !hasAttr(element, "loop");
506 | }
507 | });
508 | }
509 | // Determine which plugins should be loaded.
510 | var plugins = {
511 | controls: hasControls && {
512 | url: fixPath(html5media.flowplayerControlsSwf),
513 | opacity: 0.8,
514 | backgroundColor: "#181818",
515 | backgroundGradient: "none",
516 | fullscreen: tagName == VIDEO_TAG,
517 | autoHide: tagName == VIDEO_TAG && {
518 | fullscreenOnly: false,
519 | enabled: true,
520 | hideStyle: "fade",
521 | mouseOutDelay: 0
522 | } || {
523 | enabled: false
524 | }
525 | } || null
526 | };
527 | // HACK: Opera cannot autohide controls, for some reason.
528 | if (isOpera && plugins.controls) {
529 | plugins.controls.autoHide.enabled = false;
530 | }
531 | // Audio-specific config.
532 | if (tagName == "audio") {
533 | // Load the audio plugin.
534 | plugins.audio = {
535 | url: fixPath(html5media.flowplayerAudioSwf)
536 | };
537 | // HACK: The Flowplayer audio plugin requires that the controls plugin is present.
538 | if (!hasControls) {
539 | plugins.controls = {
540 | url: fixPath(html5media.flowplayerControlsSwf),
541 | display: "none"
542 | };
543 | replacement.style.height = 0;
544 | }
545 | // HACK: Disable autoBuffering, since a flowplayer audio bug can cause uncontrollable autoplaying.
546 | playlist[playlist.length - 1].autoBuffering = false;
547 | }
548 | // Load the Flowplayer.
549 | var config = {
550 | play: null,
551 | playlist: playlist,
552 | clip: {
553 | scaling: "fit",
554 | fadeInSpeed: 0,
555 | fadeOutSpeed: 0
556 | },
557 | canvas: {
558 | backgroundGradient: "none",
559 | backgroundColor: "#000000"
560 | },
561 | plugins: plugins
562 | };
563 | config = html5media.configureFlowplayer(element, config);
564 | flowplayer(replacement, {
565 | src: fixPath(html5media.flowplayerSwf),
566 | expressInstall: fixPath(html5media.expressInstallSwf),
567 | wmode: "opaque"
568 | }, config);
569 | };
570 |
571 | // Automatically execute the html5media function on page load.
572 | DomReady.ready(html5media);
573 |
574 | // Expose html5media to the global object.
575 | window.html5media = html5media;
576 |
577 | })(this, document);
--------------------------------------------------------------------------------
/src/static/js/jquery.jplayer.min.js:
--------------------------------------------------------------------------------
1 | /*! jPlayer 2.9.1 for jQuery ~ (c) 2009-2014 Happyworm Ltd ~ MIT License */
2 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):b("object"==typeof exports?require("jquery"):a.jQuery?a.jQuery:a.Zepto)}(this,function(a,b){a.fn.jPlayer=function(c){var d="jPlayer",e="string"==typeof c,f=Array.prototype.slice.call(arguments,1),g=this;return c=!e&&f.length?a.extend.apply(null,[!0,c].concat(f)):c,e&&"_"===c.charAt(0)?g:(this.each(e?function(){var e=a(this).data(d),h=e&&a.isFunction(e[c])?e[c].apply(e,f):e;return h!==e&&h!==b?(g=h,!1):void 0}:function(){var b=a(this).data(d);b?b.option(c||{}):a(this).data(d,new a.jPlayer(c,this))}),g)},a.jPlayer=function(b,c){if(arguments.length){this.element=a(c),this.options=a.extend(!0,{},this.options,b);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()}),this._init()}},"function"!=typeof a.fn.stop&&(a.fn.stop=function(){}),a.jPlayer.emulateMethods="load play pause",a.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate",a.jPlayer.emulateOptions="muted volume",a.jPlayer.reservedEvent="ready flashreset resize repeat error warning",a.jPlayer.event={},a.each(["ready","setmedia","flashreset","resize","repeat","click","error","warning","loadstart","progress","suspend","abort","emptied","stalled","play","pause","loadedmetadata","loadeddata","waiting","playing","canplay","canplaythrough","seeking","seeked","timeupdate","ended","ratechange","durationchange","volumechange"],function(){a.jPlayer.event[this]="jPlayer_"+this}),a.jPlayer.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","canplay","canplaythrough"],a.jPlayer.pause=function(){a.jPlayer.prototype.destroyRemoved(),a.each(a.jPlayer.prototype.instances,function(a,b){b.data("jPlayer").status.srcSet&&b.jPlayer("pause")})},a.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,sepHour:":",sepMin:":",sepSec:""};var c=function(){this.init()};c.prototype={init:function(){this.options={timeFormat:a.jPlayer.timeFormat}},time:function(a){a=a&&"number"==typeof a?a:0;var b=new Date(1e3*a),c=b.getUTCHours(),d=this.options.timeFormat.showHour?b.getUTCMinutes():b.getUTCMinutes()+60*c,e=this.options.timeFormat.showMin?b.getUTCSeconds():b.getUTCSeconds()+60*d,f=this.options.timeFormat.padHour&&10>c?"0"+c:c,g=this.options.timeFormat.padMin&&10>d?"0"+d:d,h=this.options.timeFormat.padSec&&10>e?"0"+e:e,i="";return i+=this.options.timeFormat.showHour?f+this.options.timeFormat.sepHour:"",i+=this.options.timeFormat.showMin?g+this.options.timeFormat.sepMin:"",i+=this.options.timeFormat.showSec?h+this.options.timeFormat.sepSec:""}};var d=new c;a.jPlayer.convertTime=function(a){return d.time(a)},a.jPlayer.uaBrowser=function(a){var b=a.toLowerCase(),c=/(webkit)[ \/]([\w.]+)/,d=/(opera)(?:.*version)?[ \/]([\w.]+)/,e=/(msie) ([\w.]+)/,f=/(mozilla)(?:.*? rv:([\w.]+))?/,g=c.exec(b)||d.exec(b)||e.exec(b)||b.indexOf("compatible")<0&&f.exec(b)||[];return{browser:g[1]||"",version:g[2]||"0"}},a.jPlayer.uaPlatform=function(a){var b=a.toLowerCase(),c=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/,d=/(ipad|playbook)/,e=/(android)/,f=/(mobile)/,g=c.exec(b)||[],h=d.exec(b)||!f.exec(b)&&e.exec(b)||[];return g[1]&&(g[1]=g[1].replace(/\s/g,"_")),{platform:g[1]||"",tablet:h[1]||""}},a.jPlayer.browser={},a.jPlayer.platform={};var e=a.jPlayer.uaBrowser(navigator.userAgent);e.browser&&(a.jPlayer.browser[e.browser]=!0,a.jPlayer.browser.version=e.version);var f=a.jPlayer.uaPlatform(navigator.userAgent);f.platform&&(a.jPlayer.platform[f.platform]=!0,a.jPlayer.platform.mobile=!f.tablet,a.jPlayer.platform.tablet=!!f.tablet),a.jPlayer.getDocMode=function(){var b;return a.jPlayer.browser.msie&&(document.documentMode?b=document.documentMode:(b=5,document.compatMode&&"CSS1Compat"===document.compatMode&&(b=7))),b},a.jPlayer.browser.documentMode=a.jPlayer.getDocMode(),a.jPlayer.nativeFeatures={init:function(){var a,b,c,d=document,e=d.createElement("video"),f={w3c:["fullscreenEnabled","fullscreenElement","requestFullscreen","exitFullscreen","fullscreenchange","fullscreenerror"],moz:["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror"],webkit:["","webkitCurrentFullScreenElement","webkitRequestFullScreen","webkitCancelFullScreen","webkitfullscreenchange",""],webkitVideo:["webkitSupportsFullscreen","webkitDisplayingFullscreen","webkitEnterFullscreen","webkitExitFullscreen","",""],ms:["","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError"]},g=["w3c","moz","webkit","webkitVideo","ms"];for(this.fullscreen=a={support:{w3c:!!d[f.w3c[0]],moz:!!d[f.moz[0]],webkit:"function"==typeof d[f.webkit[3]],webkitVideo:"function"==typeof e[f.webkitVideo[2]],ms:"function"==typeof e[f.ms[2]]},used:{}},b=0,c=g.length;c>b;b++){var h=g[b];if(a.support[h]){a.spec=h,a.used[h]=!0;break}}if(a.spec){var i=f[a.spec];a.api={fullscreenEnabled:!0,fullscreenElement:function(a){return a=a?a:d,a[i[1]]},requestFullscreen:function(a){return a[i[2]]()},exitFullscreen:function(a){return a=a?a:d,a[i[3]]()}},a.event={fullscreenchange:i[4],fullscreenerror:i[5]}}else a.api={fullscreenEnabled:!1,fullscreenElement:function(){return null},requestFullscreen:function(){},exitFullscreen:function(){}},a.event={}}},a.jPlayer.nativeFeatures.init(),a.jPlayer.focus=null,a.jPlayer.keyIgnoreElementNames="A INPUT TEXTAREA SELECT BUTTON";var g=function(b){var c,d=a.jPlayer.focus;d&&(a.each(a.jPlayer.keyIgnoreElementNames.split(/\s+/g),function(a,d){return b.target.nodeName.toUpperCase()===d.toUpperCase()?(c=!0,!1):void 0}),c||a.each(d.options.keyBindings,function(c,e){return e&&a.isFunction(e.fn)&&("number"==typeof e.key&&b.which===e.key||"string"==typeof e.key&&b.key===e.key)?(b.preventDefault(),e.fn(d),!1):void 0}))};a.jPlayer.keys=function(b){var c="keydown.jPlayer";a(document.documentElement).unbind(c),b&&a(document.documentElement).bind(c,g)},a.jPlayer.keys(!0),a.jPlayer.prototype={count:0,version:{script:"2.9.1",needFlash:"2.9.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",auroraFormats:"wav",preload:"metadata",volume:.8,muted:!1,remainingDuration:!1,toggleDuration:!1,captureDuration:!0,playbackRate:1,defaultPlaybackRate:1,minPlaybackRate:.5,maxPlaybackRate:4,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",volumeMax:".jp-volume-max",playbackRateBar:".jp-playback-rate-bar",playbackRateBarValue:".jp-playback-rate-bar-value",currentTime:".jp-current-time",duration:".jp-duration",title:".jp-title",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen",repeat:".jp-repeat",repeatOff:".jp-repeat-off",gui:".jp-gui",noSolution:".jp-no-solution"},stateClass:{playing:"jp-state-playing",seeking:"jp-state-seeking",muted:"jp-state-muted",looped:"jp-state-looped",fullScreen:"jp-state-full-screen",noVolume:"jp-state-no-volume"},useStateClassSkin:!1,autoBlur:!0,smoothPlayBar:!1,fullScreen:!1,fullWindow:!1,autohide:{restored:!1,full:!0,fadeIn:200,fadeOut:600,hold:1e3},loop:!1,repeat:function(b){b.jPlayer.options.loop?a(this).unbind(".jPlayerRepeat").bind(a.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){a(this).jPlayer("play")}):a(this).unbind(".jPlayerRepeat")},nativeVideoControls:{},noFullWindow:{msie:/msie [0-6]\./,ipad:/ipad.*?os [0-4]\./,iphone:/iphone/,ipod:/ipod/,android_pad:/android [0-3]\.(?!.*?mobile)/,android_phone:/(?=.*android)(?!.*chrome)(?=.*mobile)/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/},noVolume:{ipad:/ipad/,iphone:/iphone/,ipod:/ipod/,android_pad:/android(?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/,playbook:/playbook/},timeFormat:{},keyEnabled:!1,audioFullScreen:!1,keyBindings:{play:{key:80,fn:function(a){a.status.paused?a.play():a.pause()}},fullScreen:{key:70,fn:function(a){(a.status.video||a.options.audioFullScreen)&&a._setOption("fullScreen",!a.options.fullScreen)}},muted:{key:77,fn:function(a){a._muted(!a.options.muted)}},volumeUp:{key:190,fn:function(a){a.volume(a.options.volume+.1)}},volumeDown:{key:188,fn:function(a){a.volume(a.options.volume-.1)}},loop:{key:76,fn:function(a){a._loop(!a.options.loop)}}},verticalVolume:!1,verticalPlaybackRate:!1,globalVolume:!1,idPrefix:"jp",noConflict:"jQuery",emulateHtml:!1,consoleAlerts:!0,errorAlerts:!1,warningAlerts:!1},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"100%",cssClass:"jp-video-full"}},instances:{},status:{src:"",media:{},paused:!0,format:{},formatType:"",waitForPlay:!0,waitForLoad:!0,srcSet:!1,video:!1,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,remaining:0,videoWidth:0,videoHeight:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:!1},solution:{html:!0,aurora:!0,flash:!0},format:{mp3:{codec:"audio/mpeg",flashCanPlay:!0,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:!0,media:"audio"},m3u8a:{codec:'application/vnd.apple.mpegurl; codecs="mp4a.40.2"',flashCanPlay:!1,media:"audio"},m3ua:{codec:"audio/mpegurl",flashCanPlay:!1,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis, opus"',flashCanPlay:!1,media:"audio"},flac:{codec:"audio/x-flac",flashCanPlay:!1,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:!1,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:!1,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:!0,media:"audio"},rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!0,media:"video"},m3u8v:{codec:'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!1,media:"video"},m3uv:{codec:"audio/mpegurl",flashCanPlay:!1,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:!1,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:!1,media:"video"},flv:{codec:"video/x-flv",flashCanPlay:!0,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"video"}},_init:function(){var c=this;if(this.element.empty(),this.status=a.extend({},this.status),this.internal=a.extend({},this.internal),this.options.timeFormat=a.extend({},a.jPlayer.timeFormat,this.options.timeFormat),this.internal.cmdsIgnored=a.jPlayer.platform.ipad||a.jPlayer.platform.iphone||a.jPlayer.platform.ipod,this.internal.domNode=this.element.get(0),this.options.keyEnabled&&!a.jPlayer.focus&&(a.jPlayer.focus=this),this.androidFix={setMedia:!1,play:!1,pause:!1,time:0/0},a.jPlayer.platform.android&&(this.options.preload="auto"!==this.options.preload?"metadata":"auto"),this.formats=[],this.solutions=[],this.require={},this.htmlElement={},this.html={},this.html.audio={},this.html.video={},this.aurora={},this.aurora.formats=[],this.aurora.properties=[],this.flash={},this.css={},this.css.cs={},this.css.jq={},this.ancestorJq=[],this.options.volume=this._limitValue(this.options.volume,0,1),a.each(this.options.supplied.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.format[e]){var f=!1;a.each(c.formats,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.formats.push(e)}}),a.each(this.options.solution.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.solution[e]){var f=!1;a.each(c.solutions,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.solutions.push(e)}}),a.each(this.options.auroraFormats.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.format[e]){var f=!1;a.each(c.aurora.formats,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.aurora.formats.push(e)}}),this.internal.instance="jp_"+this.count,this.instances[this.internal.instance]=this.element,this.element.attr("id")||this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count),this.internal.self=a.extend({},{id:this.element.attr("id"),jq:this.element}),this.internal.audio=a.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:b}),this.internal.video=a.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:b}),this.internal.flash=a.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:b,swf:this.options.swfPath+(".swf"!==this.options.swfPath.toLowerCase().slice(-4)?(this.options.swfPath&&"/"!==this.options.swfPath.slice(-1)?"/":"")+"jquery.jplayer.swf":"")}),this.internal.poster=a.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:b}),a.each(a.jPlayer.event,function(a,d){c.options[a]!==b&&(c.element.bind(d+".jPlayer",c.options[a]),c.options[a]=b)}),this.require.audio=!1,this.require.video=!1,a.each(this.formats,function(a,b){c.require[c.format[b].media]=!0}),this.options=this.require.video?a.extend(!0,{},this.optionsVideo,this.options):a.extend(!0,{},this.optionsAudio,this.options),this._setSize(),this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls),this.status.noFullWindow=this._uaBlocklist(this.options.noFullWindow),this.status.noVolume=this._uaBlocklist(this.options.noVolume),a.jPlayer.nativeFeatures.fullscreen.api.fullscreenEnabled&&this._fullscreenAddEventListeners(),this._restrictNativeVideoControls(),this.htmlElement.poster=document.createElement("img"),this.htmlElement.poster.id=this.internal.poster.id,this.htmlElement.poster.onload=function(){(!c.status.video||c.status.waitForPlay)&&c.internal.poster.jq.show()},this.element.append(this.htmlElement.poster),this.internal.poster.jq=a("#"+this.internal.poster.id),this.internal.poster.jq.css({width:this.status.width,height:this.status.height}),this.internal.poster.jq.hide(),this.internal.poster.jq.bind("click.jPlayer",function(){c._trigger(a.jPlayer.event.click)}),this.html.audio.available=!1,this.require.audio&&(this.htmlElement.audio=document.createElement("audio"),this.htmlElement.audio.id=this.internal.audio.id,this.html.audio.available=!!this.htmlElement.audio.canPlayType&&this._testCanPlayType(this.htmlElement.audio)),this.html.video.available=!1,this.require.video&&(this.htmlElement.video=document.createElement("video"),this.htmlElement.video.id=this.internal.video.id,this.html.video.available=!!this.htmlElement.video.canPlayType&&this._testCanPlayType(this.htmlElement.video)),this.flash.available=this._checkForFlash(10.1),this.html.canPlay={},this.aurora.canPlay={},this.flash.canPlay={},a.each(this.formats,function(b,d){c.html.canPlay[d]=c.html[c.format[d].media].available&&""!==c.htmlElement[c.format[d].media].canPlayType(c.format[d].codec),c.aurora.canPlay[d]=a.inArray(d,c.aurora.formats)>-1,c.flash.canPlay[d]=c.format[d].flashCanPlay&&c.flash.available}),this.html.desired=!1,this.aurora.desired=!1,this.flash.desired=!1,a.each(this.solutions,function(b,d){if(0===b)c[d].desired=!0;else{var e=!1,f=!1;a.each(c.formats,function(a,b){c[c.solutions[0]].canPlay[b]&&("video"===c.format[b].media?f=!0:e=!0)}),c[d].desired=c.require.audio&&!e||c.require.video&&!f}}),this.html.support={},this.aurora.support={},this.flash.support={},a.each(this.formats,function(a,b){c.html.support[b]=c.html.canPlay[b]&&c.html.desired,c.aurora.support[b]=c.aurora.canPlay[b]&&c.aurora.desired,c.flash.support[b]=c.flash.canPlay[b]&&c.flash.desired}),this.html.used=!1,this.aurora.used=!1,this.flash.used=!1,a.each(this.solutions,function(b,d){a.each(c.formats,function(a,b){return c[d].support[b]?(c[d].used=!0,!1):void 0})}),this._resetActive(),this._resetGate(),this._cssSelectorAncestor(this.options.cssSelectorAncestor),this.html.used||this.aurora.used||this.flash.used?this.css.jq.noSolution.length&&this.css.jq.noSolution.hide():(this._error({type:a.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:a.jPlayer.errorMsg.NO_SOLUTION,hint:a.jPlayer.errorHint.NO_SOLUTION}),this.css.jq.noSolution.length&&this.css.jq.noSolution.show()),this.flash.used){var d,e="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+"&muted="+this.options.muted;if(a.jPlayer.browser.msie&&(Number(a.jPlayer.browser.version)<9||a.jPlayer.browser.documentMode<9)){var f=' ',g=[' ',' ',' ',' ',' '];d=document.createElement(f);for(var h=0;h0&&(d.internal.cmdsIgnored=!1),d._getHtmlStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.progress))},!1),b.addEventListener("loadeddata",function(){c.gate&&(d.androidFix.setMedia=!1,d.androidFix.play&&(d.androidFix.play=!1,d.play(d.androidFix.time)),d.androidFix.pause&&(d.androidFix.pause=!1,d.pause(d.androidFix.time)),d._trigger(a.jPlayer.event.loadeddata))},!1),b.addEventListener("timeupdate",function(){c.gate&&(d._getHtmlStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.timeupdate))},!1),b.addEventListener("durationchange",function(){c.gate&&(d._getHtmlStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.durationchange))},!1),b.addEventListener("play",function(){c.gate&&(d._updateButtons(!0),d._html_checkWaitForPlay(),d._trigger(a.jPlayer.event.play))},!1),b.addEventListener("playing",function(){c.gate&&(d._updateButtons(!0),d._seeked(),d._trigger(a.jPlayer.event.playing))},!1),b.addEventListener("pause",function(){c.gate&&(d._updateButtons(!1),d._trigger(a.jPlayer.event.pause))},!1),b.addEventListener("waiting",function(){c.gate&&(d._seeking(),d._trigger(a.jPlayer.event.waiting))},!1),b.addEventListener("seeking",function(){c.gate&&(d._seeking(),d._trigger(a.jPlayer.event.seeking))},!1),b.addEventListener("seeked",function(){c.gate&&(d._seeked(),d._trigger(a.jPlayer.event.seeked))},!1),b.addEventListener("volumechange",function(){c.gate&&(d.options.volume=b.volume,d.options.muted=b.muted,d._updateMute(),d._updateVolume(),d._trigger(a.jPlayer.event.volumechange))},!1),b.addEventListener("ratechange",function(){c.gate&&(d.options.defaultPlaybackRate=b.defaultPlaybackRate,d.options.playbackRate=b.playbackRate,d._updatePlaybackRate(),d._trigger(a.jPlayer.event.ratechange))},!1),b.addEventListener("suspend",function(){c.gate&&(d._seeked(),d._trigger(a.jPlayer.event.suspend))},!1),b.addEventListener("ended",function(){c.gate&&(a.jPlayer.browser.webkit||(d.htmlElement.media.currentTime=0),d.htmlElement.media.pause(),d._updateButtons(!1),d._getHtmlStatus(b,!0),d._updateInterface(),d._trigger(a.jPlayer.event.ended))},!1),b.addEventListener("error",function(){c.gate&&(d._updateButtons(!1),d._seeked(),d.status.srcSet&&(clearTimeout(d.internal.htmlDlyCmdId),d.status.waitForLoad=!0,d.status.waitForPlay=!0,d.status.video&&!d.status.nativeVideoControls&&d.internal.video.jq.css({width:"0px",height:"0px"}),d._validString(d.status.media.poster)&&!d.status.nativeVideoControls&&d.internal.poster.jq.show(),d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show(),d._error({type:a.jPlayer.error.URL,context:d.status.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL})))},!1),a.each(a.jPlayer.htmlEvent,function(e,f){b.addEventListener(this,function(){c.gate&&d._trigger(a.jPlayer.event[f])},!1)})},_addAuroraEventListeners:function(b,c){var d=this;b.volume=100*this.options.volume,b.on("progress",function(){c.gate&&(d.internal.cmdsIgnored&&this.readyState>0&&(d.internal.cmdsIgnored=!1),d._getAuroraStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.progress),b.duration>0&&d._trigger(a.jPlayer.event.timeupdate))},!1),b.on("ready",function(){c.gate&&d._trigger(a.jPlayer.event.loadeddata)},!1),b.on("duration",function(){c.gate&&(d._getAuroraStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.durationchange))},!1),b.on("end",function(){c.gate&&(d._updateButtons(!1),d._getAuroraStatus(b,!0),d._updateInterface(),d._trigger(a.jPlayer.event.ended))},!1),b.on("error",function(){c.gate&&(d._updateButtons(!1),d._seeked(),d.status.srcSet&&(d.status.waitForLoad=!0,d.status.waitForPlay=!0,d.status.video&&!d.status.nativeVideoControls&&d.internal.video.jq.css({width:"0px",height:"0px"}),d._validString(d.status.media.poster)&&!d.status.nativeVideoControls&&d.internal.poster.jq.show(),d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show(),d._error({type:a.jPlayer.error.URL,context:d.status.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL})))},!1)},_getHtmlStatus:function(a,b){var c=0,d=0,e=0,f=0;isFinite(a.duration)&&(this.status.duration=a.duration),c=a.currentTime,d=this.status.duration>0?100*c/this.status.duration:0,"object"==typeof a.seekable&&a.seekable.length>0?(e=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100,f=this.status.duration>0?100*a.currentTime/a.seekable.end(a.seekable.length-1):0):(e=100,f=d),b&&(c=0,f=0,d=0),this.status.seekPercent=e,this.status.currentPercentRelative=f,this.status.currentPercentAbsolute=d,this.status.currentTime=c,this.status.remaining=this.status.duration-this.status.currentTime,this.status.videoWidth=a.videoWidth,this.status.videoHeight=a.videoHeight,this.status.readyState=a.readyState,this.status.networkState=a.networkState,this.status.playbackRate=a.playbackRate,this.status.ended=a.ended},_getAuroraStatus:function(a,b){var c=0,d=0,e=0,f=0;this.status.duration=a.duration/1e3,c=a.currentTime/1e3,d=this.status.duration>0?100*c/this.status.duration:0,a.buffered>0?(e=this.status.duration>0?a.buffered*this.status.duration/this.status.duration:100,f=this.status.duration>0?c/(a.buffered*this.status.duration):0):(e=100,f=d),b&&(c=0,f=0,d=0),this.status.seekPercent=e,this.status.currentPercentRelative=f,this.status.currentPercentAbsolute=d,this.status.currentTime=c,this.status.remaining=this.status.duration-this.status.currentTime,this.status.readyState=4,this.status.networkState=0,this.status.playbackRate=1,this.status.ended=!1},_resetStatus:function(){this.status=a.extend({},this.status,a.jPlayer.prototype.status)},_trigger:function(b,c,d){var e=a.Event(b);e.jPlayer={},e.jPlayer.version=a.extend({},this.version),e.jPlayer.options=a.extend(!0,{},this.options),e.jPlayer.status=a.extend(!0,{},this.status),e.jPlayer.html=a.extend(!0,{},this.html),e.jPlayer.aurora=a.extend(!0,{},this.aurora),e.jPlayer.flash=a.extend(!0,{},this.flash),c&&(e.jPlayer.error=a.extend({},c)),d&&(e.jPlayer.warning=a.extend({},d)),this.element.trigger(e)},jPlayerFlashEvent:function(b,c){if(b===a.jPlayer.event.ready)if(this.internal.ready){if(this.flash.gate){if(this.status.srcSet){var d=this.status.currentTime,e=this.status.paused;this.setMedia(this.status.media),this.volumeWorker(this.options.volume),d>0&&(e?this.pause(d):this.play(d))}this._trigger(a.jPlayer.event.flashreset)}}else this.internal.ready=!0,this.internal.flash.jq.css({width:"0px",height:"0px"}),this.version.flash=c.version,this.version.needFlash!==this.version.flash&&this._error({type:a.jPlayer.error.VERSION,context:this.version.flash,message:a.jPlayer.errorMsg.VERSION+this.version.flash,hint:a.jPlayer.errorHint.VERSION}),this._trigger(a.jPlayer.event.repeat),this._trigger(b);if(this.flash.gate)switch(b){case a.jPlayer.event.progress:this._getFlashStatus(c),this._updateInterface(),this._trigger(b);break;case a.jPlayer.event.timeupdate:this._getFlashStatus(c),this._updateInterface(),this._trigger(b);break;case a.jPlayer.event.play:this._seeked(),this._updateButtons(!0),this._trigger(b);break;case a.jPlayer.event.pause:this._updateButtons(!1),this._trigger(b);break;case a.jPlayer.event.ended:this._updateButtons(!1),this._trigger(b);break;case a.jPlayer.event.click:this._trigger(b);break;case a.jPlayer.event.error:this.status.waitForLoad=!0,this.status.waitForPlay=!0,this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"}),this._validString(this.status.media.poster)&&this.internal.poster.jq.show(),this.css.jq.videoPlay.length&&this.status.video&&this.css.jq.videoPlay.show(),this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media),this._updateButtons(!1),this._error({type:a.jPlayer.error.URL,context:c.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL});break;case a.jPlayer.event.seeking:this._seeking(),this._trigger(b);break;case a.jPlayer.event.seeked:this._seeked(),this._trigger(b);break;case a.jPlayer.event.ready:break;default:this._trigger(b)}return!1},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent,this.status.currentPercentRelative=a.currentPercentRelative,this.status.currentPercentAbsolute=a.currentPercentAbsolute,this.status.currentTime=a.currentTime,this.status.duration=a.duration,this.status.remaining=a.duration-a.currentTime,this.status.videoWidth=a.videoWidth,this.status.videoHeight=a.videoHeight,this.status.readyState=4,this.status.networkState=0,this.status.playbackRate=1,this.status.ended=!1},_updateButtons:function(a){a===b?a=!this.status.paused:this.status.paused=!a,a?this.addStateClass("playing"):this.removeStateClass("playing"),!this.status.noFullWindow&&this.options.fullWindow?this.addStateClass("fullScreen"):this.removeStateClass("fullScreen"),this.options.loop?this.addStateClass("looped"):this.removeStateClass("looped"),this.css.jq.play.length&&this.css.jq.pause.length&&(a?(this.css.jq.play.hide(),this.css.jq.pause.show()):(this.css.jq.play.show(),this.css.jq.pause.hide())),this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length&&(this.status.noFullWindow?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.hide()):this.options.fullWindow?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.show()):(this.css.jq.fullScreen.show(),this.css.jq.restoreScreen.hide())),this.css.jq.repeat.length&&this.css.jq.repeatOff.length&&(this.options.loop?(this.css.jq.repeat.hide(),this.css.jq.repeatOff.show()):(this.css.jq.repeat.show(),this.css.jq.repeatOff.hide()))},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+"%"),this.css.jq.playBar.length&&(this.options.smoothPlayBar?this.css.jq.playBar.stop().animate({width:this.status.currentPercentAbsolute+"%"},250,"linear"):this.css.jq.playBar.width(this.status.currentPercentRelative+"%"));var a="";this.css.jq.currentTime.length&&(a=this._convertTime(this.status.currentTime),a!==this.css.jq.currentTime.text()&&this.css.jq.currentTime.text(this._convertTime(this.status.currentTime)));var b="",c=this.status.duration,d=this.status.remaining;this.css.jq.duration.length&&("string"==typeof this.status.media.duration?b=this.status.media.duration:("number"==typeof this.status.media.duration&&(c=this.status.media.duration,d=c-this.status.currentTime),b=this.options.remainingDuration?(d>0?"-":"")+this._convertTime(d):this._convertTime(c)),b!==this.css.jq.duration.text()&&this.css.jq.duration.text(b))},_convertTime:c.prototype.time,_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg"),this.addStateClass("seeking")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg"),this.removeStateClass("seeking")},_resetGate:function(){this.html.audio.gate=!1,this.html.video.gate=!1,this.aurora.gate=!1,this.flash.gate=!1},_resetActive:function(){this.html.active=!1,this.aurora.active=!1,this.flash.active=!1},_escapeHtml:function(a){return a.split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""")},_qualifyURL:function(a){var b=document.createElement("div");
3 | return b.innerHTML='x ',b.firstChild.href},_absoluteMediaUrls:function(b){var c=this;return a.each(b,function(a,d){d&&c.format[a]&&"data:"!==d.substr(0,5)&&(b[a]=c._qualifyURL(d))}),b},addStateClass:function(a){this.ancestorJq.length&&this.ancestorJq.addClass(this.options.stateClass[a])},removeStateClass:function(a){this.ancestorJq.length&&this.ancestorJq.removeClass(this.options.stateClass[a])},setMedia:function(b){var c=this,d=!1,e=this.status.media.poster!==b.poster;this._resetMedia(),this._resetGate(),this._resetActive(),this.androidFix.setMedia=!1,this.androidFix.play=!1,this.androidFix.pause=!1,b=this._absoluteMediaUrls(b),a.each(this.formats,function(e,f){var g="video"===c.format[f].media;return a.each(c.solutions,function(e,h){if(c[h].support[f]&&c._validString(b[f])){var i="html"===h,j="aurora"===h;return g?(i?(c.html.video.gate=!0,c._html_setVideo(b),c.html.active=!0):(c.flash.gate=!0,c._flash_setVideo(b),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.show(),c.status.video=!0):(i?(c.html.audio.gate=!0,c._html_setAudio(b),c.html.active=!0,a.jPlayer.platform.android&&(c.androidFix.setMedia=!0)):j?(c.aurora.gate=!0,c._aurora_setAudio(b),c.aurora.active=!0):(c.flash.gate=!0,c._flash_setAudio(b),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.hide(),c.status.video=!1),d=!0,!1}}),d?!1:void 0}),d?(this.status.nativeVideoControls&&this.html.video.gate||this._validString(b.poster)&&(e?this.htmlElement.poster.src=b.poster:this.internal.poster.jq.show()),"string"==typeof b.title&&(this.css.jq.title.length&&this.css.jq.title.html(b.title),this.htmlElement.audio&&this.htmlElement.audio.setAttribute("title",b.title),this.htmlElement.video&&this.htmlElement.video.setAttribute("title",b.title)),this.status.srcSet=!0,this.status.media=a.extend({},b),this._updateButtons(!1),this._updateInterface(),this._trigger(a.jPlayer.event.setmedia)):this._error({type:a.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:a.jPlayer.errorMsg.NO_SUPPORT,hint:a.jPlayer.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus(),this._updateButtons(!1),this._updateInterface(),this._seeked(),this.internal.poster.jq.hide(),clearTimeout(this.internal.htmlDlyCmdId),this.html.active?this._html_resetMedia():this.aurora.active?this._aurora_resetMedia():this.flash.active&&this._flash_resetMedia()},clearMedia:function(){this._resetMedia(),this.html.active?this._html_clearMedia():this.aurora.active?this._aurora_clearMedia():this.flash.active&&this._flash_clearMedia(),this._resetGate(),this._resetActive()},load:function(){this.status.srcSet?this.html.active?this._html_load():this.aurora.active?this._aurora_load():this.flash.active&&this._flash_load():this._urlNotSetError("load")},focus:function(){this.options.keyEnabled&&(a.jPlayer.focus=this)},play:function(a){var b="object"==typeof a;b&&this.options.useStateClassSkin&&!this.status.paused?this.pause(a):(a="number"==typeof a?a:0/0,this.status.srcSet?(this.focus(),this.html.active?this._html_play(a):this.aurora.active?this._aurora_play(a):this.flash.active&&this._flash_play(a)):this._urlNotSetError("play"))},videoPlay:function(){this.play()},pause:function(a){a="number"==typeof a?a:0/0,this.status.srcSet?this.html.active?this._html_pause(a):this.aurora.active?this._aurora_pause(a):this.flash.active&&this._flash_pause(a):this._urlNotSetError("pause")},tellOthers:function(b,c){var d=this,e="function"==typeof c,f=Array.prototype.slice.call(arguments);"string"==typeof b&&(e&&f.splice(1,1),a.jPlayer.prototype.destroyRemoved(),a.each(this.instances,function(){d.element!==this&&(!e||c.call(this.data("jPlayer"),d))&&this.jPlayer.apply(this,f)}))},pauseOthers:function(a){this.tellOthers("pause",function(){return this.status.srcSet},a)},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.aurora.active?this._aurora_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100),this.status.srcSet?this.html.active?this._html_playHead(a):this.aurora.active?this._aurora_playHead(a):this.flash.active&&this._flash_playHead(a):this._urlNotSetError("playHead")},_muted:function(a){this.mutedWorker(a),this.options.globalVolume&&this.tellOthers("mutedWorker",function(){return this.options.globalVolume},a)},mutedWorker:function(b){this.options.muted=b,this.html.used&&this._html_setProperty("muted",b),this.aurora.used&&this._aurora_mute(b),this.flash.used&&this._flash_mute(b),this.html.video.gate||this.html.audio.gate||(this._updateMute(b),this._updateVolume(this.options.volume),this._trigger(a.jPlayer.event.volumechange))},mute:function(a){var c="object"==typeof a;c&&this.options.useStateClassSkin&&this.options.muted?this._muted(!1):(a=a===b?!0:!!a,this._muted(a))},unmute:function(a){a=a===b?!0:!!a,this._muted(!a)},_updateMute:function(a){a===b&&(a=this.options.muted),a?this.addStateClass("muted"):this.removeStateClass("muted"),this.css.jq.mute.length&&this.css.jq.unmute.length&&(this.status.noVolume?(this.css.jq.mute.hide(),this.css.jq.unmute.hide()):a?(this.css.jq.mute.hide(),this.css.jq.unmute.show()):(this.css.jq.mute.show(),this.css.jq.unmute.hide()))},volume:function(a){this.volumeWorker(a),this.options.globalVolume&&this.tellOthers("volumeWorker",function(){return this.options.globalVolume},a)},volumeWorker:function(b){b=this._limitValue(b,0,1),this.options.volume=b,this.html.used&&this._html_setProperty("volume",b),this.aurora.used&&this._aurora_volume(b),this.flash.used&&this._flash_volume(b),this.html.video.gate||this.html.audio.gate||(this._updateVolume(b),this._trigger(a.jPlayer.event.volumechange))},volumeBar:function(b){if(this.css.jq.volumeBar.length){var c=a(b.currentTarget),d=c.offset(),e=b.pageX-d.left,f=c.width(),g=c.height()-b.pageY+d.top,h=c.height();this.volume(this.options.verticalVolume?g/h:e/f)}this.options.muted&&this._muted(!1)},_updateVolume:function(a){a===b&&(a=this.options.volume),a=this.options.muted?0:a,this.status.noVolume?(this.addStateClass("noVolume"),this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide(),this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide(),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()):(this.removeStateClass("noVolume"),this.css.jq.volumeBar.length&&this.css.jq.volumeBar.show(),this.css.jq.volumeBarValue.length&&(this.css.jq.volumeBarValue.show(),this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](100*a+"%")),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show())},volumeMax:function(){this.volume(1),this.options.muted&&this._muted(!1)},_cssSelectorAncestor:function(b){var c=this;this.options.cssSelectorAncestor=b,this._removeUiClass(),this.ancestorJq=b?a(b):[],b&&1!==this.ancestorJq.length&&this._warning({type:a.jPlayer.warning.CSS_SELECTOR_COUNT,context:b,message:a.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:a.jPlayer.warningHint.CSS_SELECTOR_COUNT}),this._addUiClass(),a.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)}),this._updateInterface(),this._updateButtons(),this._updateAutohide(),this._updateVolume(),this._updateMute()},_cssSelector:function(b,c){var d=this;if("string"==typeof c)if(a.jPlayer.prototype.options.cssSelector[b]){if(this.css.jq[b]&&this.css.jq[b].length&&this.css.jq[b].unbind(".jPlayer"),this.options.cssSelector[b]=c,this.css.cs[b]=this.options.cssSelectorAncestor+" "+c,this.css.jq[b]=c?a(this.css.cs[b]):[],this.css.jq[b].length&&this[b]){var e=function(c){c.preventDefault(),d[b](c),d.options.autoBlur?a(this).blur():a(this).focus()};this.css.jq[b].bind("click.jPlayer",e)}c&&1!==this.css.jq[b].length&&this._warning({type:a.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[b],message:a.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[b].length+" found for "+b+" method.",hint:a.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:a.jPlayer.warning.CSS_SELECTOR_METHOD,context:b,message:a.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:a.jPlayer.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:a.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:a.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:a.jPlayer.warningHint.CSS_SELECTOR_STRING})},duration:function(a){this.options.toggleDuration&&(this.options.captureDuration&&a.stopPropagation(),this._setOption("remainingDuration",!this.options.remainingDuration))},seekBar:function(b){if(this.css.jq.seekBar.length){var c=a(b.currentTarget),d=c.offset(),e=b.pageX-d.left,f=c.width(),g=100*e/f;this.playHead(g)}},playbackRate:function(a){this._setOption("playbackRate",a)},playbackRateBar:function(b){if(this.css.jq.playbackRateBar.length){var c,d,e=a(b.currentTarget),f=e.offset(),g=b.pageX-f.left,h=e.width(),i=e.height()-b.pageY+f.top,j=e.height();c=this.options.verticalPlaybackRate?i/j:g/h,d=c*(this.options.maxPlaybackRate-this.options.minPlaybackRate)+this.options.minPlaybackRate,this.playbackRate(d)}},_updatePlaybackRate:function(){var a=this.options.playbackRate,b=(a-this.options.minPlaybackRate)/(this.options.maxPlaybackRate-this.options.minPlaybackRate);this.status.playbackRateEnabled?(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.show(),this.css.jq.playbackRateBarValue.length&&(this.css.jq.playbackRateBarValue.show(),this.css.jq.playbackRateBarValue[this.options.verticalPlaybackRate?"height":"width"](100*b+"%"))):(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.hide(),this.css.jq.playbackRateBarValue.length&&this.css.jq.playbackRateBarValue.hide())},repeat:function(a){var b="object"==typeof a;this._loop(b&&this.options.useStateClassSkin&&this.options.loop?!1:!0)},repeatOff:function(){this._loop(!1)},_loop:function(b){this.options.loop!==b&&(this.options.loop=b,this._updateButtons(),this._trigger(a.jPlayer.event.repeat))},option:function(c,d){var e=c;if(0===arguments.length)return a.extend(!0,{},this.options);if("string"==typeof c){var f=c.split(".");if(d===b){for(var g=a.extend(!0,{},this.options),h=0;h0||Math.floor(d)>0):e=!0,a.internal.mouse={x:b.pageX,y:b.pageY},e&&a.css.jq.gui.fadeIn(a.options.autohide.fadeIn,function(){clearTimeout(a.internal.autohideId),a.internal.autohideId=setTimeout(function(){a.css.jq.gui.fadeOut(a.options.autohide.fadeOut)},a.options.autohide.hold)})};this.css.jq.gui.length&&(this.css.jq.gui.stop(!0,!0),clearTimeout(this.internal.autohideId),delete this.internal.mouse,this.element.unbind(c),this.css.jq.gui.unbind(c),this.status.nativeVideoControls?this.css.jq.gui.hide():this.options.fullWindow&&this.options.autohide.full||!this.options.fullWindow&&this.options.autohide.restored?(this.element.bind(d,e),this.css.jq.gui.bind(d,e),this.css.jq.gui.hide()):this.css.jq.gui.show())},fullScreen:function(a){var b="object"==typeof a;b&&this.options.useStateClassSkin&&this.options.fullScreen?this._setOption("fullScreen",!1):this._setOption("fullScreen",!0)},restoreScreen:function(){this._setOption("fullScreen",!1)},_fullscreenAddEventListeners:function(){var b=this,c=a.jPlayer.nativeFeatures.fullscreen;c.api.fullscreenEnabled&&c.event.fullscreenchange&&("function"!=typeof this.internal.fullscreenchangeHandler&&(this.internal.fullscreenchangeHandler=function(){b._fullscreenchange()}),document.addEventListener(c.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1))},_fullscreenRemoveEventListeners:function(){var b=a.jPlayer.nativeFeatures.fullscreen;this.internal.fullscreenchangeHandler&&document.removeEventListener(b.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1)},_fullscreenchange:function(){this.options.fullScreen&&!a.jPlayer.nativeFeatures.fullscreen.api.fullscreenElement()&&this._setOption("fullScreen",!1)},_requestFullscreen:function(){var b=this.ancestorJq.length?this.ancestorJq[0]:this.element[0],c=a.jPlayer.nativeFeatures.fullscreen;c.used.webkitVideo&&(b=this.htmlElement.video),c.api.fullscreenEnabled&&c.api.requestFullscreen(b)},_exitFullscreen:function(){var b,c=a.jPlayer.nativeFeatures.fullscreen;c.used.webkitVideo&&(b=this.htmlElement.video),c.api.fullscreenEnabled&&c.api.exitFullscreen(b)},_html_initMedia:function(b){var c=a(this.htmlElement.media).empty();a.each(b.track||[],function(a,b){var d=document.createElement("track");d.setAttribute("kind",b.kind?b.kind:""),d.setAttribute("src",b.src?b.src:""),d.setAttribute("srclang",b.srclang?b.srclang:""),d.setAttribute("label",b.label?b.label:""),b.def&&d.setAttribute("default",b.def),c.append(d)}),this.htmlElement.media.src=this.status.src,"none"!==this.options.preload&&this._html_load(),this._trigger(a.jPlayer.event.timeupdate)},_html_setFormat:function(b){var c=this;a.each(this.formats,function(a,d){return c.html.support[d]&&b[d]?(c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1):void 0})},_html_setAudio:function(a){this._html_setFormat(a),this.htmlElement.media=this.htmlElement.audio,this._html_initMedia(a)},_html_setVideo:function(a){this._html_setFormat(a),this.status.nativeVideoControls&&(this.htmlElement.video.poster=this._validString(a.poster)?a.poster:""),this.htmlElement.media=this.htmlElement.video,this._html_initMedia(a)},_html_resetMedia:function(){this.htmlElement.media&&(this.htmlElement.media.id!==this.internal.video.id||this.status.nativeVideoControls||this.internal.video.jq.css({width:"0px",height:"0px"}),this.htmlElement.media.pause())},_html_clearMedia:function(){this.htmlElement.media&&(this.htmlElement.media.src="about:blank",this.htmlElement.media.load())},_html_load:function(){this.status.waitForLoad&&(this.status.waitForLoad=!1,this.htmlElement.media.load()),clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(a){var b=this,c=this.htmlElement.media;if(this.androidFix.pause=!1,this._html_load(),this.androidFix.setMedia)this.androidFix.play=!0,this.androidFix.time=a;else if(isNaN(a))c.play();else{this.internal.cmdsIgnored&&c.play();try{if(c.seekable&&!("object"==typeof c.seekable&&c.seekable.length>0))throw 1;c.currentTime=a,c.play()}catch(d){return void(this.internal.htmlDlyCmdId=setTimeout(function(){b.play(a)},250))}}this._html_checkWaitForPlay()},_html_pause:function(a){var b=this,c=this.htmlElement.media;if(this.androidFix.play=!1,a>0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId),c.pause(),this.androidFix.setMedia)this.androidFix.pause=!0,this.androidFix.time=a;else if(!isNaN(a))try{if(c.seekable&&!("object"==typeof c.seekable&&c.seekable.length>0))throw 1;c.currentTime=a}catch(d){return void(this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},250))}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this,c=this.htmlElement.media;this._html_load();try{if("object"==typeof c.seekable&&c.seekable.length>0)c.currentTime=a*c.seekable.end(c.seekable.length-1)/100;else{if(!(c.duration>0)||isNaN(c.duration))throw"e";c.currentTime=a*c.duration/100}}catch(d){return void(this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},250))}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.video.jq.css({width:this.status.width,height:this.status.height})))},_html_setProperty:function(a,b){this.html.audio.available&&(this.htmlElement.audio[a]=b),this.html.video.available&&(this.htmlElement.video[a]=b)},_aurora_setAudio:function(b){var c=this;a.each(this.formats,function(a,d){return c.aurora.support[d]&&b[d]?(c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1):void 0}),this.aurora.player=new AV.Player.fromURL(this.status.src),this._addAuroraEventListeners(this.aurora.player,this.aurora),"auto"===this.options.preload&&(this._aurora_load(),this.status.waitForLoad=!1)},_aurora_resetMedia:function(){this.aurora.player&&this.aurora.player.stop()},_aurora_clearMedia:function(){},_aurora_load:function(){this.status.waitForLoad&&(this.status.waitForLoad=!1,this.aurora.player.preload())},_aurora_play:function(b){this.status.waitForLoad||isNaN(b)||this.aurora.player.seek(b),this.aurora.player.playing||this.aurora.player.play(),this.status.waitForLoad=!1,this._aurora_checkWaitForPlay(),this._updateButtons(!0),this._trigger(a.jPlayer.event.play)},_aurora_pause:function(b){isNaN(b)||this.aurora.player.seek(1e3*b),this.aurora.player.pause(),b>0&&this._aurora_checkWaitForPlay(),this._updateButtons(!1),this._trigger(a.jPlayer.event.pause)},_aurora_playHead:function(a){this.aurora.player.duration>0&&this.aurora.player.seek(a*this.aurora.player.duration/100),this.status.waitForLoad||this._aurora_checkWaitForPlay()},_aurora_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1)},_aurora_volume:function(a){this.aurora.player.volume=100*a},_aurora_mute:function(a){a?(this.aurora.properties.lastvolume=this.aurora.player.volume,this.aurora.player.volume=0):this.aurora.player.volume=this.aurora.properties.lastvolume,this.aurora.properties.muted=a},_flash_setAudio:function(b){var c=this;try{a.each(this.formats,function(a,d){if(c.flash.support[d]&&b[d]){switch(d){case"m4a":case"fla":c._getMovie().fl_setAudio_m4a(b[d]);break;case"mp3":c._getMovie().fl_setAudio_mp3(b[d]);break;case"rtmpa":c._getMovie().fl_setAudio_rtmp(b[d])}return c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(d){this._flashError(d)}},_flash_setVideo:function(b){var c=this;try{a.each(this.formats,function(a,d){if(c.flash.support[d]&&b[d]){switch(d){case"m4v":case"flv":c._getMovie().fl_setVideo_m4v(b[d]);break;case"rtmpv":c._getMovie().fl_setVideo_rtmp(b[d])}return c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(d){this._flashError(d)}},_flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"}),this._flash_pause(0/0)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=!1},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=!1,this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}a>0&&(this.status.waitForLoad=!1,this._flash_checkWaitForPlay())},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.flash.jq.css({width:this.status.width,height:this.status.height})))},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_getFlashPluginVersion:function(){var a,b=0;if(window.ActiveXObject)try{if(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")){var c=a.GetVariable("$version");c&&(c=c.split(" ")[1].split(","),b=parseInt(c[0],10)+"."+parseInt(c[1],10))}}catch(d){}else navigator.plugins&&navigator.mimeTypes.length>0&&(a=navigator.plugins["Shockwave Flash"],a&&(b=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")));return 1*b},_checkForFlash:function(a){var b=!1;return this._getFlashPluginVersion()>=a&&(b=!0),b},_validString:function(a){return a&&"string"==typeof a},_limitValue:function(a,b,c){return b>a?b:a>c?c:a},_urlNotSetError:function(b){this._error({type:a.jPlayer.error.URL_NOT_SET,context:b,message:a.jPlayer.errorMsg.URL_NOT_SET,hint:a.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(b){var c;c=this.internal.ready?"FLASH_DISABLED":"FLASH",this._error({type:a.jPlayer.error[c],context:this.internal.flash.swf,message:a.jPlayer.errorMsg[c]+b.message,hint:a.jPlayer.errorHint[c]}),this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(b){this._trigger(a.jPlayer.event.error,b),this.options.errorAlerts&&this._alert("Error!"+(b.message?"\n"+b.message:"")+(b.hint?"\n"+b.hint:"")+"\nContext: "+b.context)},_warning:function(c){this._trigger(a.jPlayer.event.warning,b,c),this.options.warningAlerts&&this._alert("Warning!"+(c.message?"\n"+c.message:"")+(c.hint?"\n"+c.hint:"")+"\nContext: "+c.context)},_alert:function(a){var b="jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a;this.options.consoleAlerts?window.console&&window.console.log&&window.console.log(b):alert(b)},_emulateHtmlBridge:function(){var b=this;a.each(a.jPlayer.emulateMethods.split(/\s+/g),function(a,c){b.internal.domNode[c]=function(a){b[c](a)}}),a.each(a.jPlayer.event,function(c,d){var e=!0;a.each(a.jPlayer.reservedEvent.split(/\s+/g),function(a,b){return b===c?(e=!1,!1):void 0}),e&&b.element.bind(d+".jPlayer.jPlayerHtml",function(){b._emulateHtmlUpdate();var a=document.createEvent("Event");a.initEvent(c,!1,!0),b.internal.domNode.dispatchEvent(a)})})},_emulateHtmlUpdate:function(){var b=this;a.each(a.jPlayer.emulateStatus.split(/\s+/g),function(a,c){b.internal.domNode[c]=b.status[c]}),a.each(a.jPlayer.emulateOptions.split(/\s+/g),function(a,c){b.internal.domNode[c]=b.options[c]})},_destroyHtmlBridge:function(){var b=this;this.element.unbind(".jPlayerHtml");var c=a.jPlayer.emulateMethods+" "+a.jPlayer.emulateStatus+" "+a.jPlayer.emulateOptions;a.each(c.split(/\s+/g),function(a,c){delete b.internal.domNode[c]})}},a.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"},a.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+a.jPlayer.prototype.version.script+" needs Jplayer.swf version "+a.jPlayer.prototype.version.needFlash+" but found "},a.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."},a.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"},a.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."},a.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}});
--------------------------------------------------------------------------------