GithubHelp home page GithubHelp logo

fikrimuhal / jwplayer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jwplayer/jwplayer

0.0 3.0 0.0 82.53 MB

JW Player is the world's most popular embeddable media player.

Home Page: https://developer.jwplayer.com/

License: Other

Shell 0.03% JavaScript 89.94% CSS 7.67% HTML 2.36%

jwplayer's Introduction

JW Player Logo

Plays everywhere, every time.

Live on over 2 million sites with 1.3 billion unique plays per month, JW Player is the solution for seamless video playback across browsers and media types. It empowers the developer to interact with video programmatically to create unique and awesome user experiences.

Disclaimer

This is the non-commercial version of JW Player. It does not contain the same features as the commercial-use player available from jwplayer.com. Commercial use and access to features requires a license. Learn more at https://www.jwplayer.com/pricing/. If you are a paid customer and want a player, please download it from the "Downloads" section of your JW Dashboard.

Official Documentation

A Simple Example

The example below will render a video player into the div with the player id, listens to an event, and makes a few calls using the API.

<!DOCTYPE html>
<html>
<head>
    <script src='LINK_TO_YOUR_PLAYER'></script>
    <script>jwplayer.key='YOUR_KEY';</script>
</head>
<body>
    <div id="player">Loading the player...</div>
    <script>
        // Setup the player
        const player = jwplayer('player').setup({
            file: 'LINK_TO_YOUR_FILE.mp4'
        });

        // Listen to an event
        player.on('pause', (event) => {
            alert('Why did my user pause their video instead of watching it?');
        });

        // Call the API
        const bumpIt = () => {
            const vol = player.getVolume();
            player.setVolume(vol + 10);
        }
        bumpIt();
    </script>
</body>
</html>

Check out an interactive example in this JSFiddle.

Contributing

We appreciate all contributions towards the player! Before submitting an issue or PR, please see our contributing docs here.

Building the Player

We use grunt and a few npm scripts to build the player, lint code, and run tests. Debug code is built to /bin-debug, while minified & uglified code is built to /bin-release. Code is built with webpack, linted with eslint, and tested with karma, mocha and chai.

Requirements:

  1. Node.js and npm

Steps:

  1. Fork the project, clone your fork, and set up the remotes:
# Clone your fork of the repo into the current directory
git clone https://github.com/<your-username>/jwplayer
# Navigate to the newly cloned directory
cd jwplayer
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/jwplayer/jwplayer
  1. Install the dependencies:
# Install grunt globally
npm install -g grunt
npm install
# Optionally, install webpack-dev-server
npm install -g webpack-dev-server
  1. Build the player:
# Build once
grunt
# Complete Watch - builds JS, lints, and tests on each change
grunt serve
# Quick JS Watch - build only. Requires webpack-dev-server to be installed globally
webpack-dev-server -w --env.debug --port 8888 --output-public-path /bin-debug/
  1. Test your code:
# All browsers
grunt test
# Individual browsers - chrome, firefox, ie11, ie10, ie9
grunt karma:{BROWSER} e.g. grunt karma:chrome
  1. Lint your code:
npm run lint
  1. Setup git pre-push hook

Will lint and run unit tests on the branch before any push to remote

grunt hooks

Software License

The use of this library is governed by a Creative Commons license. You can use, modify, copy, and distribute this edition as long as it’s for non-commercial use, you provide attribution, and share under a similar license. http://www.jwplayer.com/license/

jwplayer's People

Contributors

robwalch avatar donato avatar egreaves avatar jw-kaurand avatar pablos1 avatar alkupe avatar pajong avatar karimmourra avatar hussam-i-am avatar johnbartos avatar jeroenwijering avatar madikarizma avatar radium-v avatar emaxsaun avatar chazmatazz avatar danferrer avatar jw-ads-team avatar dannyfinks avatar mattcoz avatar johanberonius avatar isaacschemm avatar foolip avatar esboyd avatar chrisdeely avatar paulmandal avatar dyale avatar jnatalzia avatar maxstoller avatar idvl avatar kasrinat avatar

Watchers

James Cloos avatar Ilgaz Şumnulu avatar Mesut Yiğit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.