customising the buttons availabe in the controls element of the html5 video player

alexandercannon

I am trying to produce a video player with buttons to fast forward, rewind, pause and step one frame forward.

I am familiar with the theory of how to make them work using javascript - and have constructed some, admittedly slightly buggy, buttons that are separate from the player and can't be seen when I make it full screen. For clarity I have <button> elements with jquery scripts that sit under the video but aren't attached to it.

Is there a way to inject these buttons into the controls element of the html5 <video> tag so they persist and users can enjoy the use of these buttons while in full screen.

Or as an addendum - does anybody know how to sure up scripts for fastforwarding etc, they don't seem to play very nice with pausing the video - is there a known compatibility issue with javascript and the html5 video player's native pause function from controls, if not it just means my code is probably crap.

Ucinorn

As far as I have read the HTML5 video player controls are not directly stylable.

The solutions I found require you to include custom controls and disable the default ones:

http://blog.teamtreehouse.com/building-custom-controls-for-html5-videos

http://mrbool.com/how-to-style-the-html-5-video-element-with-javascript-and-css/27683

I would also argue that completely replacing the default controls would give you greater control and more stability than trying to inject new buttons after load. There is no benefit to using the standard controls, they are plain HTML, CSS and javascript and utilize the same methods you would use to build your own version.

As for fastforward, the video element has a playbackrate attribute that works really well. If you make sure your controls implement the method correctly you shuld be fine.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Custom HTML5 video player controls with AngularJS

From Java

Streaming a video file to an html5 video player with Node.js so that the video controls continue to work?

From Dev

Video streaming html5 player. how to automate sliding seek & volume controls

From Dev

Video streaming html5 player. how to automate sliding seek & volume controls

From Dev

html5 video player remove black shadow at bottom of controls section

From Dev

Styling HTML5 Video Controls

From Dev

HTML5 video custom controls

From Dev

HTML5 Video Controls do not work

From Dev

Styling HTML5 Video Controls

From Dev

HTML5 video custom controls

From Dev

html5 video player error handling

From Dev

Pause HTML5 video player on click

From Dev

Highlight player seekbar in HTML5 video

From Dev

HTML5 Video Player FullScreen Issue

From Dev

Media video player HTML5 JS

From Dev

Video player controls not showing in sharepoint

From Dev

HTML5 video tag controls="false" - controls show on pause

From Dev

Soundcloud API not working with custom HTML5 audio player with JS controls, works with HTML5 controls

From Dev

Relation between html5 video player and video js

From Dev

Making HTML5 video draggable without losing the controls

From Java

How to disable iOS HTML5 video controls?

From Dev

change html5 video controls layout when fullscreen

From Dev

HTML5 video & jQuery: show/hide controls on click

From Dev

How to Add HTML5 Video controls dynamically

From Dev

Adding controls to HTML5 background video with CSS

From Dev

HTML5 video custom controls for any number of videos on the page

From Dev

Controls not showing on HTML5 Video when using javascript

From Dev

HTML5 video custom controls for any number of videos on the page

From Dev

html5 video doesn't play on android without controls

Related Related

  1. 1

    Custom HTML5 video player controls with AngularJS

  2. 2

    Streaming a video file to an html5 video player with Node.js so that the video controls continue to work?

  3. 3

    Video streaming html5 player. how to automate sliding seek & volume controls

  4. 4

    Video streaming html5 player. how to automate sliding seek & volume controls

  5. 5

    html5 video player remove black shadow at bottom of controls section

  6. 6

    Styling HTML5 Video Controls

  7. 7

    HTML5 video custom controls

  8. 8

    HTML5 Video Controls do not work

  9. 9

    Styling HTML5 Video Controls

  10. 10

    HTML5 video custom controls

  11. 11

    html5 video player error handling

  12. 12

    Pause HTML5 video player on click

  13. 13

    Highlight player seekbar in HTML5 video

  14. 14

    HTML5 Video Player FullScreen Issue

  15. 15

    Media video player HTML5 JS

  16. 16

    Video player controls not showing in sharepoint

  17. 17

    HTML5 video tag controls="false" - controls show on pause

  18. 18

    Soundcloud API not working with custom HTML5 audio player with JS controls, works with HTML5 controls

  19. 19

    Relation between html5 video player and video js

  20. 20

    Making HTML5 video draggable without losing the controls

  21. 21

    How to disable iOS HTML5 video controls?

  22. 22

    change html5 video controls layout when fullscreen

  23. 23

    HTML5 video & jQuery: show/hide controls on click

  24. 24

    How to Add HTML5 Video controls dynamically

  25. 25

    Adding controls to HTML5 background video with CSS

  26. 26

    HTML5 video custom controls for any number of videos on the page

  27. 27

    Controls not showing on HTML5 Video when using javascript

  28. 28

    HTML5 video custom controls for any number of videos on the page

  29. 29

    html5 video doesn't play on android without controls

HotTag

Archive