-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use your hook for customising Flowplay configuration #59
Comments
Could you tell me how it doesn’t work in detail? Console error message from the browser, plus an idea of what you’re trying to do, would be useful.
|
Dear sir, My goal is writing some javascript code to control the video. For example, I want to know when the video end, click on fullscreen button to view fullscreen, click on video screen to play/pause and so on. May check the user view full video or skip forward, backward .... To do so, at first I wrote some code to change some configurations of FlowPlayer. As you can see, this block of code was written to disable fullscreen function and keyboard function. In my opinion, the video won't play/pause when I hit space, won't mute when I hit "m" .... If I put the block of code like this : script src="http://api.html5media.info/1.1.8/html5media.min.js"/script /**
nothing change, fullscreen and keyboard still works. If I put the block of code like this : script src="http://api.html5media.info/1.1.8/html5media.min.js" /script /**
In two cases, no console error |
The flow player configuration will only apply for browsers that don’t support HTML5 video. Since most browsers do support HTML5 video, it’s likely that your changes simply aren’t being applied to the native player. html5media works by inserting a FlowPlayer over every
|
I need to make video run with that check in IE8 as well. For FF and Chrome or IE11, I met no problem to check ended, fullscreen. |
Can I see a URL that demonstrates the problem? Fundamentally, flow player is configurable, after all.
|
Here is the URL https://test.point-ad-game.com/bingo01/admin/video_ads.php But, you may not view the page because it is set up to view in special IP add |
Or the code that you’re using to configure flow player?
|
Well, why code didn't show up. I removed <> to make it show up script src="http://api.html5media.info/1.1.8/html5media.min.js" /script /**
That's all. |
Please check back my previous post as well. I remove < > to make the code show up |
You're not actually using the configure flowplayer callback at all. You're just declaring a variable called "config". This is what you want to do. <script>
html5media.configureFlowplayer = function(element, config) {
config.fullscreen = false;
config.keyboard = false;
return config;
}
</script> |
Thanks for your help. I figured out how to work with this. |
Hi etianen, Thanks for your support. |
Dear sir,
Could you tell me how to config Flowplay in detail. I tried this but it won't work
<script src="http://api.html5media.info/1.1.8/html5media.min.js"></script> <script> var config = { fullscreen: false, keyboard: false }; /** * This callback should return the updated Flowplayer configuration. * The default implementation leaves the generated configuration intact. */ html5media.configureFlowplayer = function(element, config) { return config; } html5media(); </script>The text was updated successfully, but these errors were encountered: