html5media icon indicating copy to clipboard operation
html5media copied to clipboard

How to use your hook for customising Flowplay configuration

Open Shiva999 opened this issue 9 years ago • 12 comments

Dear sir,

Could you tell me how to config Flowplay in detail. I tried this but it won't work

Shiva999 avatar Mar 18 '15 04:03 Shiva999

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.

On 18 Mar 2015, at 04:25, Shiva999 [email protected] wrote:

Dear sir,

Could you tell me how to config Flowplay in detail. I tried this but it won't work

— Reply to this email directly or view it on GitHub.

etianen avatar Mar 18 '15 08:03 etianen

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 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

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 script

/**

  • This callback should return the updated Flowplayer configuration.
  • The default implementation leaves the generated configuration intact. */ html5media.configureFlowplayer = function(element, config) { var config = { fullscreen: false, keyboard: false }; return config; } html5media(); /script video won't play.

In two cases, no console error

Shiva999 avatar Mar 19 '15 03:03 Shiva999

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

On 19 Mar 2015, at 03:37, Shiva999 [email protected] wrote:

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 :

nothing change, fullscreen and keyboard still works.

If I put the block of code like this :

video won't play.

In two cases, no console error

— Reply to this email directly or view it on GitHub.

etianen avatar Mar 19 '15 08:03 etianen

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.

Shiva999 avatar Mar 19 '15 08:03 Shiva999

Can I see a URL that demonstrates the problem?

Fundamentally, flow player is configurable, after all.

On 19 Mar 2015, at 08:55, Shiva999 [email protected] wrote:

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.

— Reply to this email directly or view it on GitHub.

etianen avatar Mar 19 '15 08:03 etianen

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

Shiva999 avatar Mar 19 '15 09:03 Shiva999

Or the code that you’re using to configure flow player?

On 19 Mar 2015, at 09:04, Shiva999 [email protected] wrote:

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

— Reply to this email directly or view it on GitHub.

etianen avatar Mar 19 '15 09:03 etianen

Well, why code didn't show up. I removed <> to make it show up Here it is:

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

That's all.

Shiva999 avatar Mar 19 '15 09:03 Shiva999

Please check back my previous post as well. I remove < > to make the code show up

Shiva999 avatar Mar 19 '15 09:03 Shiva999

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>

etianen avatar Mar 19 '15 12:03 etianen

Thanks for your help. I figured out how to work with this.

Shiva999 avatar Mar 23 '15 04:03 Shiva999

Hi etianen, Can i use the configuration flowplayer to get the video's current time ? exists any way? I'm using IE8

Thanks for your support.

pipelin56 avatar Jul 09 '18 16:07 pipelin56