jwplayer made easy |
[eluser]skunkbad[/eluser]
I use jwplayer to play videos on my website. It's nice because it plays with Flash or HTML5, and HTML5 is necessary if you want to have videos that people can watch on their iPads. So I made this little library to make adding videos in views super easy: Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); This is the XML config: Code: <?xml version='1.0' encoding='UTF-8' ?> And usage in the view: Code: echo $this->video_player->jw_embedder( array( You'll of course have to have jwplayer and call jwplayer.js in the head, and load the video player library in your controller: Code: $this->load->library('video_player'); That's it. Have fun. Oh, and the [removed] is the opening and closing script tags.
[eluser]sarbaz[/eluser]
A problem:-S The video could not be loaded, either because the server or network failed or because the format is not supported: http://localhost/alma/images/videos/video.webm Code: echo $this->video_player->jw_embedder( array(
[eluser]osci[/eluser]
Many servers don't know the webm media type. You have to add it through htaccess or ask your hosting provider to do so. |
Welcome Guest, Not a member yet? Register Sign In |