As a Limelight Network Partner , I´ve been related to companies in Latin America having issues to publish video from LLNW`s OVP through their Drupal CMS and the available plugin: basically the videos published are not available for mobile devices since the plugin seems to be using the player flash portion only, instead of the entire embed code which handles device recognition.

I would like to review the specific code line where the video player script is built, in order to update the required script to successfully publish, including device recognition capabilities offered by this OVP. Unfortunately I am not a Drupal expert, so I will appreciate if you can help me by pointing where the change should be done.

Thanks in advance.

CommentFileSizeAuthor
#8 test.txt1.48 KBCarsten Müller
#7 field_limelight.zip24.9 KBseran854
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

osmac984’s picture

Hello,

what we noticed is that the plugin is not publishing the entire code offered by the video platform and it is causing a problem with the mobile detection.

Please find below the complete code from the platform:

<span class="LimelightEmbeddedPlayer">
<script src="//video.limelight.com/player/embed.js"></script>
<object type="application/x-shockwave-flash" id="limelight_player_263861" name="limelight_player_263861" class="LimelightEmbeddedPlayerFlash" width="480" height="321" data="//video.limelight.com/player/loader.swf">
<param name="movie" value="//video.limelight.com/player/loader.swf"/>
<param name="wmode" value="window"/><param name="allowScriptAccess" value="always"/>
<param name="allowFullScreen" value="true"/>
<param name="flashVars" value="mediaId=e660b9583c76483d87c000cb0d93a7c8&amp;playerForm=Player"/>
</object>
<script>LimelightPlayerUtil.initEmbed('limelight_player_263861');</script>
</span>

And please find below the code provided by the plugin:

<p><span class="LimelightEmbeddedPlayer"></span></p>
<object class="LimelightEmbeddedPlayerFlash" data="//video.limelight.com/player/loader.swf" height="250" id="limelight_player_2516" name="limelight_player_2516" type="application/x-shockwave-flash" width="300">
<param name="movie" value="//video.limelight.com/player/loader.swf">
<param name="wmode" value="window">
<param name="allowScriptAccess" value="always">
<param name="allowFullScreen" value="true">
<param name="flashVars" value="playerForm=92b6d8c6972e42ab8fa1eed6a29920bc&amp;channelId=cc4efaede38644eb8a92a7d1017299c8&amp;autoSkipNextClip=false&amp;mediaId=e660b9583c76483d87c000cb0d93a7c8">
</object>

It would be really help full if the following changes were available:

First, the first span has paragraph atributes, and besides that the span is leaving outside the

. Second, after the first span it must go the following script: <script src="//video.limelight.com/player/embed.js"></script>. Third, after closing the it must go the following script:
<code><script>LimelightPlayerUtil.initEmbed('limelight_player_263861');</script>
I look forward for your comments
osmac984’s picture

Please find the embed code documentation on the following link: http://support.video.limelight.com/support/docs/embedding/

Carsten Müller’s picture

Hello osmac984,

i'm not sure if i understand you correct. You can find the embed code in the file field_limelight.theme.inc in the function
theme_field_limelight_formatter_limelight_link(). There the theming of the embedding code is done.

I updated the theme code with your code from above, where the domain has changed. Maybe that caused some trouble. But the code is nearly the same. I pushed it in the 7.x-1.x branch, so it is not available in the download link of the module. You have to do a git checkout/clone and then switch to the branch.

You can also overwrite the theming of the function by copying the theme function into your theme and rename it.
see https://www.drupal.org/node/55126 or https://www.drupal.org/node/173880

With this possibility you can overwrite the module themeing and you can modify the code.

here is the code of the themeing function

    $content .= '<span class="LimelightEmbeddedPlayer">';
    $content .= '<script src="//video.limelight.com/player/embed.js"></script>';
    $content .= '<object type="application/x-shockwave-flash" id="limelight_player_' . $vars['player_id'] . '"
                name="limelight_player_' . $vars['player_id'] . '" class="LimelightEmbeddedPlayerFlash"
                width="' . $vars['width'] . '" height="' . $vars['height'] . '"
                data="//video.limelight.com/player/loader.swf">';
    $content .= '<param name="movie" value="//video.limelight.com/player/loader.swf"/>';
    $content .= '<param name="wmode" value="window"/><param name="allowScriptAccess" value="always"/>';
    $content .= '<param name="allowFullScreen" value="true"/>';
    $content .= '<param name="flashVars" value="mediaId=' . $vars['media_id'] . '&playerForm=' . $vars['player_id'] . '"/>';
    $content .= '</object>';
    $content .= '<script>LimelightPlayerUtil.initEmbed(\'limelight_player_' . $vars['player_id'] . '\');</script>';
    $content .= '</span>';

Cheers
Carsten

seran854’s picture

Hello Carsten,

Nice to meet you and thank you for your time, I'm Sergio Campos and I'm working with Oscar in this topic.

I want to let you know that we already implemented the changes that you suggested us but the final result is a bit confusing.

Please find below what the plugin give us now:

<span class="LimelightEmbeddedPlayer">
<script src="//video.limelight.com/player/embed.js"></script>
<a id="beforeswfanchor0" href="#limelight_player_131106" tabindex="0" title="Flash start" style="border:0;clip:rect(0 0 0 0);display:block;height:1px;margin:-1px;outline:none;overflow:hidden;padding:0;position:absolute;width:1px;" data-related-swf="limelight_player_131106"></a>
<object type="application/x-shockwave-flash" id="limelight_player_131106" name="limelight_player_131106" class="LimelightEmbeddedPlayerFlash swfPrev-beforeswfanchor0 swfNext-afterswfanchor0" width="480" height="270" data="//video.limelight.com/player/loader.swf" tabindex="0">
<param name="movie" value="//video.limelight.com/player/loader.swf">
<param name="wmode" value="window">
<param name="allowScriptAccess" value="always">
<param name="allowFullScreen" value="true">
<param name="flashVars" value="mediaId=748f1e2ff55e4221bb298a5eadb4e0c4&amp;playerForm=131106">
</object>
<a id="afterswfanchor0" href="#limelight_player_131106" tabindex="0" title="Flash end" style="border:0;clip:rect(0 0 0 0);display:block;height:1px;margin:-1px;outline:none;overflow:hidden;padding:0;position:absolute;width:1px;" data-related-swf="limelight_player_131106"></a>
<script>LimelightPlayerUtil.initEmbed('limelight_player_131106');</script>
</span>

As you can notice, there are two tags at the begining and at the end of the

tag in addition if you look into tag, specifically in the class"" there is a code that must not be there (swfPrev-beforeswfanchor0 swfNext-afterswfanchor0) Do you think it is possible to correct this misbehavior? Thank you very much for your help. We look forward for your comments
Carsten Müller’s picture

Hi Sergio,
, the
as you can see in the module and in the code i provided above, this is not set by the module. Either you have overwritten the theme with a custom function or this is added by the limelight javascript. If you have overwritten the theme function it is up to you to remove this. I cannot access your code. If this is added by limelights javascript i can also not interact with that. I think it is the second option, the code is added by the limelight javascript, but i'm not sure about this.

Sorry, it is a long time ago i worked with this for a customer. I have currently no test setup running and also no account at limelight for testing.

I want to help, but i don't know how.

Cheers
Carsten

seran854’s picture

FileSize
24.9 KB

Hello Carsten,

This is a non common situation because I only changed the code as you suggested, I did not add anything else.

Please find attached the .zip file of what I uploaded as the plugin. The code is just as you suggested.

In the other hand, we work directly with limelight and we are sure that the javascript is not adding that extra code.

I look forward for your comments and thank you for your time and help.

Carsten Müller’s picture

FileSize
1.48 KB

Hi Sergio,

i just took your code from above and put it in a file. It works, the video ist started and displayed.
I attached the file. So if there are problems on your site that the video is not running, it is a problem of your javascript or css.
If i open the site a video of cloudcol ist displayed (sound is off, so i don't know what it is about).

The file ending is changed into .txt, just rename into test.php

Cheers
Carsten

seran854’s picture

Hello Carsten,

Do you have the chance to review it on a mobile device? because the problem is not for desktop.

Regards

Carsten Müller’s picture

Hi,

is this issue still valid?