jwplayer / jwplayer Goto Github PK
View Code? Open in Web Editor NEWJW Player is the world's most popular embeddable media player.
Home Page: https://developer.jwplayer.com/
License: Other
JW Player is the world's most popular embeddable media player.
Home Page: https://developer.jwplayer.com/
License: Other
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
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));
Google Chrome Version 44.0.2403.157 (64-bit)
Mac OSX 10.10.3
Reproduce by:
The line found at https://github.com/jwplayer/jwplayer/blob/master/src/js/view/components/thumbnails.mixin.js#L81
should change from: style.backgroundImage = url;
to: style.backgroundImage = 'url(' + url + ')';
Hi,
I'm looking to write a provider for JW7, but i can't seem to find how to extend my provider with the backbone events you are using like here: https://github.com/jwplayer/jwplayer/blob/master/src/js/providers/html5.js#L61
Any help will be appreciated.
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.
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
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/
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
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.
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>
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
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;
...
})
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.
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
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.
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
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:
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
The quality setting doesn't indicate which option has been selected. Also, changing the quality setting does not seem to have an effect. I tested by setting it to the worst / best possible setting. It appears to be stuck on auto.
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?
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
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.
Suggested fix; is to add
.jw-plugin-sharing .jw-sharing-container {
z-index: 10;
}
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
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".
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 🙏
Logo need disable when a sharing and related overlay is up.
JW7 - 7.2.2
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.
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.
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
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
Hi ,
Is there a way to control or modify the timeout of the player for preroll ads playing?
@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>
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>
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.
<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.
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
This is a bug in Shaka 1.4.x and is fixed in 1.5.0 which was released on September 17.
shaka-project/shaka-player#143
The bug refers to live streams, but it affects on-demand stream clips as well.
All of our thumbnail URLs are broken because of this line...
jwplayer/src/js/view/preview.js
Line 24 in eacf851
We have urls to thumbnails in S3 that have a signature and key in them with special characters that are there by design, that encodeUri()
destroys. Any workaround for this?
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,
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:
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:
jwplayer/src/js/providers/providers.js
Line 13 in 8779a33
So how can i choose between which provider to use?
Are you going to release any < 6 source code version?
thank you in advance :)
When a mp4 movie is composed of still image(2fps) and audio, Firefox can't play the movie correctly.
like this ↓
index.html
line 15.index.html
with latest version of Firefox.🙏
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 !
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
Is there an available compiled distribution that can be installed with bower without compiling?
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?
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
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
The html5 provider is not forwarding pause events from the video tag. This is necessary to determine when video is paused on iPhone.
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:
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.