Linear

WordPress: Problems with Firefox and Flash Fallback (Projekktor for Wordpress)

by teamA, Monday, February 20, 2012, 03:30 (459 days ago)

Hi There,

Excellent code, really impressed by how far you've taken this. I am trying to use this on a wordpress site, loading the video inline via fancybox. I have it working for the most part. I've installed the plugin, and instead of using shortcodes I am using my own code to write to the page.

For instance:


		<div style="display:none;">
		<video id="inlineVid" width="<?php echo $video['width']; ?>" height="<?php echo $video['height']; ?>" class="projekktor" poster="<?php echo $posterURL; ?>" title="<?php echo $post->post_title; ?>" controls="controls">
				<?php foreach($video['file'] as $file) : ?>
				<source src="http://andrewsoutham.com/video-files/<?php echo $video['path'].'/'.$file['name']; ?>" type="video/<?php echo $file['format']; ?>" />
				<?php if($file['format'] == 'mov') { ?>
				<source src="http://andrewsoutham.com/video-files/<?php echo $video['path'].'/'.$file['name']; ?>" type="video/mp4" />
				<?php } ?>
				<?php endforeach; ?>
		</video>
		</div>

However, I am getting no flash fallback whatsoever and in FF3 - FF11 on a Mac I am getting no playback, sometimes with a no mime type error, sometimes with no error listed.

I feel like I need to be adding an additional string of javascript to the page. If so, can you point me in the right direction?

You can view the live page, with one working example here (click the poster image):

http://andrewsoutham.com/dev/video/

Thanks,
Aris

  659 views
Avatar

WordPress: Problems with Firefox and Flash Fallback

by sascha ⌂ @, Monday, February 20, 2012, 18:01 (459 days ago) @ teamA

Hi Aris,

Excellent code, really impressed by how far you've taken this.

Thank you very much.

I feel like I need to be adding an additional string of javascript to the page. If so, can you point me in the right direction?

That´s correct. It seems that the instantiation call is missing in general. Somewhere on your site you need to set:

<script type="text/javascript">
$(document).ready(function() {
     projekktor('.projekktor, PROJEKKTORGLOBAL);
})
</script>

Now all you need to do is to tell fancybox to start the player once it opens. Please check this demo for an extended example.

Take Care,

Sascha

---
Help keeping free Projekktor support alive. Consider to buy supporter license: http://shop.projekktorxl.com/shop/supporter-license/

  771 views