Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION My Video Display Plugin
#1
Nice plugin http://get-simple.info/extend/plugin/my-...splay/862/

But is there possibility to set many players on one page like with YouTube Video Display Plugin?
Reply
#2
Out of curiosity, why don't you use simple HTML5 <vodeo> above for that?

Code:
<video id="sampleMovie" preload controls>
    <source src="sample.mov" />
    <source src="sample.ogv" />
    <source src="sample.webm" />
</video>
<video id="sampleMovie2" preload controls>
    <source src="sample2.mov" />
    <source src="sample2.ogv" />
    <source src="sample2.webm" />
</video>
Reply
#3
1. I want to adopt videojs player or jwplayer
2. The look of native browser players isn't the same
3. User doesn't have to know HTML at all
4. Typing (% myvideo path=/path/to/file.mp4 %) is more understandable
Reply
#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
#5
Thanks for your advices Bigin. I will try it.
Reply
#6
You might be able to make shortcode for plugin Gs Shortcodes.
Reply




Users browsing this thread: 1 Guest(s)