Sorry, I didn't try latest 2.x version as I am cautious with important production site.

I have read all documentation and it seems to me that player is a sophisticated formatter of specially configured media field.

Is it any way to use the player inline? I mean for example a Body written of some content type and, between some paragraphs, links or embed codes that display player with media file. Of course provided that embed tag is permitted with Text Formats.

Comments

AndrzejG’s picture

Status: Active » Closed (works as designed)

OK, I see the solutions on new mediafront.org site. Thanks.

AndrzejG’s picture

Status: Closed (works as designed) » Active

Sorry, the solution form mediafront.org doesn't work.

I installed last beta2 version, enabled. No preset.
Uploaded my.mp4 file.

In a page with full HTML text format i typed:

<script type="text/javascript">
  $(function() {
    $("video").osmplayer({
      width: '100%',
      height: '288px'
    });
  });
</script>
<video src="http://mysite.org/sites/default/files/my.mp4"></video>

Nothing is displayed.
Something wrong?

Please reply asap.

AndrzejG’s picture

Priority: Normal » Major

I change priority

travist’s picture

Status: Active » Fixed

If you don't create a preset, then you still need to add the JavaScript & CSS files to the page for the media player to show up. You can easily do this by using a simple call to drupal_add_library like so...

<?php
drupal_add_library('osmplayer', 'osmplayer_default');
?>

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

tonyhrx’s picture

Hmm. I'm following your guide.
So Ive loaded up the library in template.php. I added the script using html.tpl.php.
Ive now added the video inline in a node body field
<video src="http://butrous.fabriko.co.uk/sites/default/files/Install9.mp4" tabindex="0"></video>
But getting nothing.

http://butrous.fabriko.co.uk/content/inline-test

Am I doing something wrong or has something changed?

Are there any working examples anywhere of the inline code working?

Thanks

tonyhrx’s picture

Status: Closed (fixed) » Active
tonyhrx’s picture

Priority: Major » Minor
tonyhrx’s picture

I used this code that worked in Firefox. Doesnt stream but at least it plays

<script type="text/javascript">
  jQuery(function() {
    jQuery("video").osmplayer({
      width: '100%',
      height: '500px',
      logo: '/sites/default/files/see-through-logo_2_0.png',
      link: '<?php print url('<front>', array('absolute' => TRUE)); ?>',
      swfplayer: '/sites/all/modules/mediafront/players/osmplayer/player/minplayer/flash/minplayer.swf'
    });
  });
</script>
travist’s picture

Issue tags: +Documentation

Adding documentation tag.