Skip to content
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

Open
Shiva999 opened this issue Mar 18, 2015 · 12 comments
Open

How to use your hook for customising Flowplay configuration #59

Shiva999 opened this issue Mar 18, 2015 · 12 comments

Comments

@Shiva999
Copy link

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>
@etianen
Copy link
Owner

etianen commented Mar 18, 2015

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.

@Shiva999
Copy link
Author

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

@etianen
Copy link
Owner

etianen commented Mar 19, 2015

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.

@Shiva999
Copy link
Author

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.

@etianen
Copy link
Owner

etianen commented Mar 19, 2015

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.

@Shiva999
Copy link
Author

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

@etianen
Copy link
Owner

etianen commented Mar 19, 2015

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.

@Shiva999
Copy link
Author

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
Copy link
Author

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

@etianen
Copy link
Owner

etianen commented Mar 19, 2015

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>

@Shiva999
Copy link
Author

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

@pipelin56
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants