Posts: 9
Threads: 1
Joined: Jan 2016
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?
Posts: 538
Threads: 12
Joined: May 2013
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>
Posts: 9
Threads: 1
Joined: Jan 2016
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
Posts: 538
Threads: 12
Joined: May 2013
2016-01-04, 09:01:48
(This post was last modified: 2016-01-04, 09:04:26 by Bigin.)
(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.
Posts: 9
Threads: 1
Joined: Jan 2016
Thanks for your advices Bigin. I will try it.
Posts: 1,247
Threads: 82
Joined: Feb 2011
You might be able to make shortcode for plugin
Gs Shortcodes.