Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION My Video Display Plugin
#4
(2016-01-04, 07:12:25)roisag Wrote: 1. I want to adopt videojs player or jwplayer

Hmm, do what you want:
Code:
<script src="/your/theme/path/js/jwplayer.js"></script>



(2016-01-04, 07:12:25)roisag Wrote: 2. The look of native browser players isn't the same

Oh yes, native player is much better and more flexible:
http://splashnology.com/article/how-to-m...ideo/2654/
One more example:
http://videojs.com/



(2016-01-04, 07:12:25)roisag Wrote: 3. User doesn't have to know HTML at all

Unfortunately yes, but HTML5 is so wonderful, so much better than ugly pseudo-tags like (% %)



(2016-01-04, 07:12:25)roisag Wrote: 4. Typing (% myvideo path=/path/to/file.mp4 %) is more understandable

I see no reason why you should use a plugin for such a simple task like this
You can just put the code in your theme:


PHP Code:
<?php
$input 
returnPageContent('enter_your_page_slug_here');
preg_match_all('/\{([^\}]+)\}/i'$input$m);
$paths $m[1];
foreach(
$paths as $key => $path) { ?>
    <div id="myElement<?php echo $key?>">Loading the player...</div>
    <script type="text/javascript">
    jwplayer("myElement<?php echo $key?>").setup({
        file: "<?php echo $path?>",
        width: "400px",
        aspectratio: "16:9",
        type: "mp4"
    });
    </script>
<?php 


Afterwards, you can simply use your pseudo-tags in page content for example:

Code:
{ /paht/to_file.mp4 }

Here is my page content

{ /paht/to_file2.mp4 }


Thats all you need.
Reply


Messages In This Thread
My Video Display Plugin - by roisag - 2016-01-04, 04:44:34
RE: My Video Display Plugin - by Bigin - 2016-01-04, 06:30:18
RE: My Video Display Plugin - by roisag - 2016-01-04, 07:12:25
RE: My Video Display Plugin - by Bigin - 2016-01-04, 09:01:48
RE: My Video Display Plugin - by roisag - 2016-01-04, 17:33:52
RE: My Video Display Plugin - by datiswous - 2016-01-04, 20:18:16



Users browsing this thread: 1 Guest(s)