Code Monkey home page Code Monkey logo

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>

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:

  • Node.js with npm
  • Install global npm dependencies npm install -g eslint grunt-cli jsdoc karma-cli stylelint webpack webpack-cli

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 dependencies
npm install -g eslint grunt-cli jsdoc karma-cli stylelint webpack webpack-cli
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/
# Open the test page from another terminal window
open http://localhost:8888/test/manual/
  1. Test your code:
# All browsers
grunt test
# Individual browsers - chrome, firefox, safari
grunt karma:{BROWSER} e.g. grunt karma:chrome
  1. Lint your code:
npm run lint
  1. Setup git pre-push hook This will add a pre-push script to the project's .git/hooks folder that will lint and run unit tests on the branch before any push.
grunt hooks

Framework Integration

The JW team officially maintains and supports framework integration for React.

Framework Link
React https://github.com/jwplayer/jwplayer-react

If you have a library which you believe is good enough to meet the needs of other developers using a certain framework, please open a pull request modifying the above table.

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

alkupe avatar boyntoni avatar chazmatazz avatar danferrer avatar dannyfinks avatar dawolee avatar dependabot[bot] avatar donato avatar egreaves avatar emaxsaun avatar hussam-i-am avatar imbcmdth avatar jeroenwijering avatar jnatalzia avatar johanberonius avatar johnbartos avatar jw-ads-team avatar jw-kaurand avatar jwbrandon avatar karimmourra avatar madikarizma avatar mamaddox avatar mattcoz avatar pablos1 avatar pajong avatar radium-v avatar robwalch avatar vseventer avatar waxidiotic avatar zetagame avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jwplayer's Issues

Support for AMD usage of jwplayer

The reason seems to be that the flash player needs access to window.jwplayer. window.jwplayer is not set when using AMD (or CommonJS), therefore the flash player doesn't work.

While waiting for a fix, a workaround is to simply set window.jwplayer in the app's code:

define(['jwplayer'], function (jwplayer) {
  window.jwplayer = jwplayer;

  ...
})

Video in player scales down smaller than the size of the player

@frandevinney and I have been debugging an issue with the jwplayer for some time now. It seems that when the player is less than 639px in width, a transform css property is added inline to the video tag. This produces a rather ugly letterbox around video content.

For example (player width 638px) -
<video x-webkit-airplay="allow" webkit-playsinline="" src="{video-url}" style="bottom: 0px; top: 0px; left: -1px; right: -1px; transform: scale(0.996875, 1); width: 640px; height: 360px;"></video>

embed_large


The transform scale gets greater and greater as the video player is further reduced (player width 400px) -
<video x-webkit-airplay="allow" webkit-playsinline="" src="{video-url}" style="bottom: -67px; top: -67px; left: -120px; right: -120px; transform: scale(0.625, 0.627778); width: 640px; height: 360px;"></video>

embed_small


We've worked around this issue by recompiling and sending a return before transformScale is set.

your code - https://github.com/jwplayer/jwplayer/blob/master/src/js/view/view.js#L739-L772

our work around - a174823

With this in place our video players no longer display in a letterboxed player.

embed_new
<video class="jw-video jw-reset" x-webkit-airplay="allow" webkit-playsinline="" src="{video-url}" preload="metadata"></video>

While we realize this is not a true fix, we're hoping that this issue could shed some light on this issue. We're currently browser testing and it looks like based on our needs we might go with this solution.

appearing jwplayer on different browsers

hi again. sorry I'm new with jwplayer specially 7 versions and their changes.
As I said before I build Jwplayer version 7.1.0 but still I have some problems to deal with.
My jwplayer only appears on chrome, although if I link the file to an url, it will be wait on loading and do nothing (no problem with audios that load from PC or URL (net) and videos from PC). also jwplayer does not show up on mozilla firefox and IE (opera and the other browsers have not been tested yet :)).
in build process I got no html.js file in my bin release, I just have swf and js. is that normal?!
and one last thing is we should script jwplayer.js from bin release or debug release?
would you mind help me to solve these problems?
thanks

Support audio panning

Hello folks,

first of all thanks for all the hard work on this fantastic player.

Me and my company are commercial users of JWPlayer, and as part of our core business, we have the need of panning the audio of a video (by panning I mean, obviously, the ability to adjust the levels of the right and left audio channels, mute the left, mute the right, etc). There is a "hack" going around in internet which expose two new API calls to the flash version of the player, as described here:

http://www.kokozo.net/jwplayer_pannable/

The API change seems to be minimal.
Do you think you could start from this as a base and provide audio panning for RTMP videos?

A fantastic bonus would be also to allow skinning of the player exposing two new "ouleft" for adjusting the panning directly from the player.

As regards the mobile world, since the WebAudio API is still not yet so richful, even a partial solution would be better than nothing. As inspiration you could take a look at this plugin for video.js:

https://github.com/cladera/videojs-stereopanner

It doesn't work on mobile, but it seems to leverage a full-html5 API :)

Thanks in advance!
Alfredo

jwplayer 7 & require.js

I can't seem to get jwplayer 7 to work with require .js version 6 was working fine.

It seems that window.jwplayer is not set, and as a result 'ReferenceError: jwplayer is not defined'

Creating a shim with require.js has no effect either. I can see the file physically being called, but not declaring the jwplayer variable.

When I inspect my Window cars, I have this reference 'webpackJsonpjwplayer' and that's about it.

Obviously, when I don't use require.js everything works, but unfortunately that's not an option for my project as we're trying to upgrade to jwplayer 7.

7.0.3 calling getDuration following the initial on('play') returns 0

I am writing an analytics plug-in, and have that found calling getDuration after the on('play') event is dispatched the first time returns 0. It is not until the first on('time') event that you receive the correct duration.

(function(jwplayer) {
    jwplayer().registerPlugin('playerAnalytics', '7', function(player, options, element) {
        var trackHandler = function(e) {
            var video = player.getPlaylistItem();
            var video_meta = {
                duration: parseInt(player.getDuration()),
                player_name: options.player_name || 'JW Player',
                title: video.title || video.file
            };
            console.log(video_meta); // video_meta.duration = 0
        };
        player.on('play', trackHandler);
        player.on('pause', trackHandler);
        player.on('complete', trackHandler);
        player.on('time', trackHandler);
    });
}(window.jwplayer));

Determine if video tag requires interaction to start playback

Currently the player branches in different areas using isMobile() based on the user agent to prevent playback from being attempted until the user interacts with the player. (#893 model disables autostart, html5 provider buffering).

Instead, the player should have a check if interaction is required to start playback. This should be set through feature detection if possible or user agent (isMobile), and the setting should be able to be overridden in the config.

Once playback has started in a video tag, interaction is no longer required. So the branching that we do every time on mobile only really needs to happen once, after the video tag has played new sources do not need to wait and play() from the API will work for new sources.

The config option can have 3 settings, and will be set by the player by default based on what we can determine about the current platform:

config.playRequiresInteraction will be one of:

  • "always" playback can autostart (*or begin by calling video.play())
  • "first" playback cannot autostart*, changes to "always" after first interaction
  • "none" playback cannot autostart*

Since this behavior applies to the video tag, we can track the current state of this setting on the tag itself. Let's see if this or anything similar has been proposed to the w3c media group.

Looked into what Apple is doing in WebKit. See removeBehaviorsRestrictionsAfterFirstUserGesture in HTMLMediaElement
http://trac.webkit.org/changeset/108831

http://trac.webkit.org/browser/trunk/LayoutTests/media/video-play-require-user-gesture.html?rev=108831

The video.play() now returns a promise, which gets rejected if a gesture is required to play:
https://webkit.org/blog/6784/new-video-policies-for-ios/

Fetch and AJAX utils

Our AJAX utils are geared toward xml loading and not well suited to loading JSON (getting better #904). We should consider using/polyfilling Fetch, and make sure the util(s) allows us to specify the type of content we're requesting to optimize response handling.

Mootools 1.4.5 breaks JWPlayer7

I noticed that mootools 1.4.5 core library stops jwplayer7 from working with errors:
Uncaught TypeError: Cannot read property 'css' of undefined
Uncaught ReferenceError: jwplayer is not defined
Uncaught ReferenceError: jwplayer is not defined

getPlaylistItem() problems in jwplayer v6.9

Hi,

I'm using jwplayer v6.9 Pro and i'm trying to get the current playlist item playing / playlist items / playlist item index, but in console i get undefined.
Is there any chance to get this working with this version of jwplayer ?

All i want to do is to set the array of my playlist items dinamically and to get the current item.
Then i will add a class '.active' of the current item to the playlist dots.

Demo : http://zshare-fiverr.hi2.ro/jwplayer/test.html .

Thanks in advice !

Sharing close button conflict with logo link

  • When have a logo with link and a sharing button.
  • A user select the sharing button, and the overlay is shown.
  • However the z-index of the overlay is not set. So when the logo is place over the close button of the sharing overlay.

Suggested fix; is to add

.jw-plugin-sharing .jw-sharing-container {
    z-index: 10;
}

jwplayer README.md says it's open source, but license doesn't meet Open Source Definition

By far the most commonly-used definition of "open source" is the one from the Open Source Initiative (OSI): http://opensource.org/osd .

The very first item in that definition is:

"1. Free Redistribution. The license shall not restrict any party from selling or giving away the software as a component of an aggregate software distribution containing programs from several different sources. The license shall not require a royalty or other fee for such sale."

Selling the software, whether on its own or in aggregate, is not permitted by JWPlayer's license, CC-BY-NC-SA, because that license has a non-commercial restriction. So, JWPlayer is not open source using the standard definition, and the README.md and other docs and websites should be updated to remove that claim, because it will cause confusion and upset.

Do not attempt to load chunk files from CDN in open-source builds

I've no problems building 7.0.1 but noticed some odd changes with 7.0.2/7.0.3

Below is the build outputs for 7.0.1 and 7.0.3.

$ ls jwplayer-7.0.1/bin-release
jwplayer.09c66dd58cf6fdcbe348.map   jwplayer.flash.swf          jwplayer.js

$ ls jwplayer-7.0.3/bin-release
1.1.js                      jwplayer.f966f8df54d94c1842ba.map       provider.youtube.f966f8df54d94c1842ba.map
1.f966f8df54d94c1842ba.map          jwplayer.flash.swf
2.provider.youtube.js               jwplayer.js

Also, when testing 7.0.2/3, the page attempts to load "http://p.jwpcdn.com/player/v/7.0.3/2.provider.youtube.js" (which returns a 404).

I did not have these problems with the 7.0.1 build.

Any idea what's wrong?

can not play mp4 with html5

when i use ffmpeg
ffmpeg -i '.mp4' -vf 'movie=0:png:/.png [wm];[in][wm] overlay=20:20:1 [out]' -acodec libfaac -ab 32k -ac 2 -vcodec libx264 -vpre fast -s x -r 15 -crf 28 -threads 0 /*.mp4

and i can play it in flash mode and html5 mode

but when i use the following code again
ffmpeg -i '.mp4' -vf "transpose 1' -acodec libfaac -ab 32k -ac 2 -vcodec libx264 -vpre fast -s x -r 15 -crf 28 -threads 0 /.mp4

i can only play it in flash mode

it shows "error loading media file could not be played"

anyone can help me or give me some suggest

chinese poor english ╮( ̄▽ ̄")╭ thanks for all

Delayed Seek in HTML5 provider

Handling of seek commands before 'timeupdate' or 'canplay' events by setting a _delayedSeek time results in a lot of complexity in html5.js. This was made worse recently by having to add a video tag play() for Firefox to trigger the 'canplay' event we require after changing video src (#916).

We need to continue to simplify html5.js by removing individual properties or flags that introduce functionality in the provider that is meant to store desired state.

JW7 - Primary isn't working when using multiple providers

Hello,

I have two providers, one for flash playback and one for html5 playback.
They are named (In the provider name context) "flashp" &"html5p".

I'm trying to switch between the playback of them by using the primary property in the player config as such:

// registering html5p provider here
jwplayer.api.registerProvider(Html5Provider);

// load player
jwplayer('player').setup({
        playlist: [{
            file: 'link-to-stream,
            provider: 'link-to-flash-provider'
        }],
        primary: 'flashp'
    });

Correct me if i'm wrong, but to set the flash providers name i need to use super('flashp'); in the providers actionscript code in the constructor right?

If thats true, then i expect that using primary: 'flashp' will play with the flash provider, and if i change it to primary: 'html5p' it will use the html5 provider. However it does not work.

When debugging and going over the listed providers here:

this.providers = ProvidersSupported.slice();
i don't see the flash provider name, but i do see the html5 one.

If i rename the html5 provider to "html5" it overrides the default html5 playback and then if i use primary: 'flash' it will swap them here:

swap(this.providers, 'html5', 'flash');
and then it will work and use my flash provider, .
But obviously i don't want to override the default playback, just create an additional one.

So how can i choose between which provider to use?

Multiple players with YouTube embeds on a single page do not initialize

Having multiple JW Players with YouTube embedded videos on a single webpage does not seem to initialize all videos well. The first player works, but all next players only initialize the JW Player skin and preview image, not the YouTube video.

While debugging the JW Player source I triggered this exception:

There was an error calling back an event handler for "ready". Error: Cannot read property 'loaded' of undefined

I think what happens is:

  • The first player triggers embedding the YouTube iframe_api and waits for it to load before initializing the video
  • Next players don't wait for the iframe_api (window.YT and window.YT.loaded) to be loaded

I have tested this with JW Player 7.0.3 and the latest versions of Chrome, Canary, Firefox and IE11:
http://wim.latour.nl/jwplayer/jwplayer7-multiple-youtube.html

What solves this issue (for now) is loading the YouTube iframe_api myself and initialize the JW Players in the onYouTubeIframeAPIReady() callback:
http://wim.latour.nl/jwplayer/jwplayer7-multiple-youtube-with-iframe_api.html

Tested with JW Player version: 7.0.3+commercial_v7-0-3.45.commercial.39321c.jwplayer.d015f3.analytics.1c4f4e.vast.19906c.googima.deb821.plugins.3891c4 as downloaded from https://dashboard.jwplayer.com/#/players/downloads

Add support for Windows Surface IE10+

Right now, JWPlayer works on Windows Surface IE10 in mouse mode even though it is a touch device. This makes it unusable for some features. For example,

  • Trying to change the volume - Tapping on volume, it mutes/unmutes. The volume slider does not stay because JWPlayer thinks it is a desktop mouse enabled device and expects a mouseover event to show the volume slider. (IE has pointer events which are a unification of touch and mouse events)
  • Trying to change the subtitle language - Tapping on 'CC' the language list does not stay for the same reason as above.

Undetected stalls in RTMP audio streams

An audio-only live stream (via RTMP) does not report nor recover from stalls due to bad network conditions

Please see the example here:
http://plnkr.co/Gj9z0E

When using the network link conditioner on OSX I can cause a playing audio stream to stall and the audio playback to cease. These stalls are either not detected by the player or not surfaced via events.

time events continue to fire, but the playback position remains at the last known time.

Since there is no concrete event surfaced for this condition, we cannot easily detect the stalls and attempt to reconnect or message the user.

Also, when conditions improve, the connection is often not reestablished.

HLS support

Hi guys

Does the open source player support HLS? I've been trying to get it to play HLS on Android, and although the stream does start playing, I get a setup error, and now events are fired. I've also tried a plain-Jane test on Chrome and HLS doesn't seem to want to play there either.

Thanks
J

Remove flash

I have had enough of flash and you guys are the root cause to all the eval why all website still use flash on there webpages still till this day!

Html5 video element is supported in all browser long time ago

Flash is only a burden. You have to maintain 2 players now... The only thing i see flash is used for today is flash banners and video streaming. So it makes since why tusens of ppl use click-to-flash to ignore all the banners and only enables them when they want to see movies. But that is not the only reason ppl block flash. Flash for Mac has a bug where CPU goes to the roof. There is a reason why there is many users has installed flash block addons. Flash also has many security issues that has needed hot-fixes. The extra flash player just brings frustation to users and extra payload in terms of size and compilation by browsers VM where non mobile browser even supports flash. Flash also drains alot battery life. You can save 1000 of man hours on building one awesome html5 player instead of maintaining 2.

One more thing that is fucking annoying is that even if the video format is supported in both html5 and flash player in my browser you still stick to the flash player by default and dosen't use flash as a fallback witch leads to this ugly frame on all websites over the web
skarmavbild 2015-11-15 kl 02 36 03

The built in click-to-flash dosen't cut it. It still enables javascript to detect if flash is installed so thats make it OKEY to use flash first. The navigator.plugins["Shockwave Flash"] shouldn't even be exposed to javascript to be a successful flash blocker to make it switch to html5 mode. That + security, performance and battery is why i have disabled flash in my browsers.

The only way to truly force the web to embrace modern open standards is to invalidate old technology.

Flash blocked error reported when autostart is false

I have videos that will play fine with autostart set to true, but when autostart is set to false it will report the flash plugin as being blocked. I've tested this in both Firefox and Chrome and get the same result. I can go into the developer tools, remove the jw-flag-flash-blocked class to show the controls, then press play and it plays fine.

7.1.4 (true): https://digital.sportingedge.com/video/streaming/TESTVIDEO/video.do
7.1.4 (false): https://digital.sportingedge.com/video/streaming/TESTVIDEO/video.do?autoplay=false
7.2.3 (true): https://digital.sportingedge.com:8443/video/streaming/TESTVIDEO/video.do
7.2.3 (false): https://digital.sportingedge.com:8443/video/streaming/TESTVIDEO/video.do?autoplay=false

IE9 issue.

SCRIPT5007: Unable to get property "call" values: the object is null or undefined
polyfills.promise.js, Line 1 Character 1
SCRIPT5007: Unable to get property "call" values: the object is null or undefined
polyfills.base64.js, Line 1 Character 1

error build

Running "flash:debug" (flash) task
C:\AIRSDK_Compiler/bin/mxmlc -compiler.source-path=src/flash -compiler.library-p
ath+=C:\AIRSDK_Compiler/frameworks/libs -default-background-color=0x000000 -defa
ult-frame-rate=30 -target-player=11.2 -swf-version=15 -use-network=true -show-mu
ltiple-definition-warnings=true -compiler.inline=true -compiler.remove-dead-code
=true -define+=JWPLAYER::"version,'7.2.0-alpha.0'" -output=bin-debug/jwplayer.fl
ash.swf src/flash/com/longtailvideo/jwplayer/player/Player.as -link-report=bin-d
ebug/jwplayer.flashlink.xml -size-report=bin-debug/jwplayer.flashsize.xml -stric
t=true -debug=true -define+=CONFIG::debugging,true
Fatal error: spawn C:\AIRSDK_Compiler\bin\mxmlc ENOENT

no Firefox 31 support

JW 7 doesn't work on Firefox 31. After click on play button the loading spinner is visible and the video is never loaded. (Firefox 42 works)

Tested on Saucelabs:
Firefox 31
OS X Mavericks

Is there a way to detect the support for used browser?

Older Versions

Are you going to release any < 6 source code version?
thank you in advance :)

About IDE

Thanks for your product
jwplayer is very powerful

i want know which ide your use

i build then in grunt and Atom

but i don't know how to debug the source code

jwplayer7.0.1+flash doesn't work.(bug?)

Hello.

I updated jwplayer from v6.x to v7.0.1
Since then, there has been something wrong with playing videos with "flash".(setup option primary: 'flash')
It stops with "buffering" status and never becomes "play".

-- my environment --
pc: mac(yosemite)
browser: chrome
flash player: version 18,0,0,232 installed

Incidentally, in FireFox and Safari, "html5" is automatically used instead of "flash" in spite of this setting → primary: 'flash'. (and it works.)

if using version 6.x, this problem doesn't occur.

please instruct me if you have some solution 🙏

Aac stream works in FF, but in no other browser

Hi. I have been struggling for 2 days, and can't make jwplayer begin to stream aac audio (via Icecast KH) on any other browser except FF.
FF works only when stream mount ends with .aac, but even that doesn't help the player in other browsers (the loader rotates forever).

Any idea what might be the reason?

THank you in advance
Christo

Buffering in adaptive multi-bitrate live streams

Hello,
We are using JW Player 7.14 Ads Edition and found that many times the player can not perform well when the available download bandwidth suddenly decreases. I made a short video (and uploaded to our CDN: http://httphu-service01.connectmedia.hu/6136/JW_buffering_1.mov) where I simply set the download speed to 1 Mbit/s with Network Link Conditioner and I got a lot of buffering sign on the screen. As you can see in the video, I have not set any other "problem" like packed drop or delay. The profile bitrates are: 3, 1.5, 1, 0.8, 0.4 Mb/s with 64 kb/s audio.
My questions: Do you know about this issue? Is there any improvement in progress regarding this issue?
Can I provide more details which can help you to analize this issue more deeply?
Thanks in advance,
Laszlo

[7.0.3] jwplayer.css and skins/*.css not generated for bin-release/

These files are generated in bin-debug/ but not in bin-release/.

$ ls -Rp bin-release
1.2b0fc0e9ccad7dbe4f92.map          jwplayer.flash.swf              provider.youtube.js
1.js                        jwplayer.js
jwplayer.2b0fc0e9ccad7dbe4f92.map       provider.youtube.2b0fc0e9ccad7dbe4f92.map

$ ls -Rp bin-debug
1.2b0fc0e9ccad7dbe4f92.map          jwplayer.flash.swf              provider.youtube.2b0fc0e9ccad7dbe4f92.map
1.js                        jwplayer.flashlink.xml              provider.youtube.js
jwplayer.2b0fc0e9ccad7dbe4f92.map       jwplayer.flashsize.xml              skins/
jwplayer.css                    jwplayer.js

bin-debug/skins:
beelden.css     five.css        roundster.css       six.css         vapor.css
bekle.css       glow.css        seven.css       stormtrooper.css

Audio-only stream fails to start

I discovered an odd bug while trying to play an audio-only RTMP stream. An audio-only stream will fail to play (at least audibly) until after the library has been used to play at least one video asset/stream.

The audio player will initialize, buffer & "play" but no sound is heard and the controls have no effect. Once you call setup() on a video instance, the audio will suddenly work.

I'm attempting to track down the issue, my only clue so far is that the firstFrame event is not fired for the audio player until after the video instance is initialized.

Below is a simple test page I created for this bug. You will need to supply an appropriate path for the JW js file.

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>JWP Bug Audio stream fails to start</title>
    <script src="//content.jwplatform.com/libraries/INSERT_LIB_LOCATION.js"></script>
</head>
<body>
    <h1>Bug Description</h1>
    <p>An audio-only live stream (via RTMP or HLS) will not begin playback until after the
        JWPlayer has been used to play a video asset/stream first.</p>
    <h2>Steps to recreate:</h2>
    <ol>
        <li>Click the 'Audio' button to initialize the audio-only player</li>
        <li>The log will show events for the audio player up to and including 'play', but no audio is heard</li>
        <li>Click the 'Video' button</li>
        <li>The audio stream will be heard immediately (note the 'firstFrame' event in the log</li>
    </ol>
      <h1>Audio only test</h1>
      <div id="audio-player"></div>

      <h1>Video test</h1>
      <div id="video-player"></div>

    <button id="play-audio">Audio</button>
    <button id="play-video">Video</button>

    <h2>Log Area</h2>
    <textarea id="log" style="width:400px;height:300px"></textarea>

<script>
    var audioStartBtn = document.getElementById("play-audio");
    var videoStartBtn = document.getElementById("play-video");
    var logArea = document.getElementById("log");

    audioStartBtn.addEventListener("click", function () {
        jwplayer("audio-player").setup({
            height: 40,
            width: 600,
            autostart: true,
            mute: false,
            primary:'flash',
            playlist: [
                {
                    title: "Live Audio Test",
                    sources:[
                        {file: "rtmp://stream-7.antenne.de/liveedge/rockantenne", type:'rtmp'}
                    ]
                }
            ],
            rtmp:{
                subscribe: true
            },
            controls:true,
            skin: {"name": "six"}
        }).on('all', function (type, data) {
            //filter out the very frequent events for performance
            if(type == 'time' || type== 'meta') return;
            console.log(type, data);
            logArea.value += "\n" + type;
        });
    });

    videoStartBtn.addEventListener("click", function () {
        jwplayer("video-player").setup({
            width: 640,
            height: 480,
            autostart: false,
            primary: "flash",
            playlist:[
                {
                    sources:[
                        {file: "http://content.jwplatform.com/videos/nPripu9l-twSo9iFz.mp4"}
                    ]
                }
            ]
        });
    });

</script>
</body>
</html>

can not build jwplayer

hi
I have already installed node.js and JAVA and Adobe air SDK. I also installed air SDK by using npm. and when I use npm install in my jwplayer directory I got this error
capture
please help to solve that

Tab focus: match browser's styling and don't show on pointer focus

When the player has focus we show a blue outline around the player. Currently this happens on keyboard, mouse, touch and pointer focus. This is because we developed the feature to work in JW Player 6 with Flash as well as standard CSS :focus.

The focus border should match the other form elements in the browser, and should only show up when tabbing to the player, not when clicking on it.

Can the _stream variable of MediaProvider extenders be made protected?

Hello folks,

I'm trying to implement audio panning via a flash provider plugin (yes, it's always me!) so we don't need to have & maintain an in-house fork of JW. What I'm trying to accomplish is to start easy by extending VideoMediaProvider with panning capabilities. Translated into AS3, I need to manipulate a NetStream object with a SoundTransform:

        protected function streamPan(level:Number):void {
            _transformer.pan = level / 100;
            if (_stream) {
                _stream.soundTransform = _transformer;
            }
        }

Obviously I do not want to copy & paste or duplicate any of the JW code, to be able to benefit from all the updates you guys release. But due to the fact _stream is declared as private my hands are tied:

https://github.com/jwplayer/jwplayer/blob/master/src/flash/com/longtailvideo/jwplayer/media/VideoMediaProvider.as#L41

Same goes for the others "extenders" of MediaProvider, like RTMPProvider, for example.

Would you consider making _stream protected and/or part of IMediaProvider interface? This way, I can still extend VideoMediaPlayer without any code duplication, but yet we don't leak informations everywhere.

What do you guys think?
Thank you!

Alfredo

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.