DailyMotion Videos

edwardshephard's Avatar


28 Dec, 2012 10:43 PM

Is is possible to get the slider to play DailyMotion videos please?

  1. Support Staff 1 Posted by Dmytro Semenov on 29 Dec, 2012 08:58 AM

    Dmytro Semenov's Avatar


    By default - no. Here are instructions how to add custom player markup http://help.dimsemenov.com/kb/royalslider-javascript-api/adding-sup...


  2. 2 Posted by edwardshephard on 29 Dec, 2012 12:13 PM

    edwardshephard's Avatar

    Okay thanks Dmtry,

    I did read that first honest, but thought that it was relating to swapping out the entire player rather than adding a code for one slide. My slight problem is that I am loading the content from a database so will need to find a way to detect the filetype for each slide.

    <ul class="royalSlider rsMinW"> <if test="is_array( $records ) && count( $records )"> <foreach loop="$records as $r">
    <li> <if test="$r['field_143']"><!--Video--> <img class="rsImg" src="http://www.bn.org.uk/community/ul99893000c39df/{$r['field_143']}" data-rsVideo="{$r['field_144']}" /> <else /><!--Image--> <img class="rsImg" src="http://www.bn.org.uk/community/ul99893000c39df/{$r['field_143']}"> </if> <div class="rsABlock infoBlock" style="display: block; left: {$r['field_153']}px; top: {$r['field_152']}px; position: absolute; z-index: 15; -webkit-backface-visibility: hidden; padding: 20px; background: rgba({$r['field_154']}, {$r['field_155']}); text-align: left;"> <h2 style="font-size:2.3em; color:#{$r['field_146']}; margin-bottom:20px">{$r['field_145']}</h2> <h4 style="font-size:1.4em; color:#{$r['field_148']}; margin-bottom:20px">{$r['field_147']}</h4> <p><a style="font-size:1.0em; font-weight: bolder; text-transform: uppercase; margin-bottom:0px; color:#{$r['field_150']};" href="{$r['field_151']}">{$r['field_149']} →</a></p> </div> </li> </foreach> </if> </ul>

    I'd welcome any bright ideas, otherwise I'll have to give it some more thought. Anyway thanks for coming back to me.

  3. 3 Posted by edwardshephard on 29 Dec, 2012 12:27 PM

    edwardshephard's Avatar

    Hmm, yes I've just looked at the jwplayer example and am not sure that this is what I'm looking for - sorry if I'm not understanding.

    The above code pulls records from a mysql database and then loops through them to build the slider content. For each one it checks to see if there is anything in the video URL field...

    <if test="$r['field_143']">

    ...and if there is add it into the display or otherwise just displays an image. At the moment this handles Youtube and Vimeo videos, but I should also like to link to videos on Dailymotion so that I can play three different video types in one slider set. Is that possible through the example you gave, or is that swapping all of the video out for a third-party player. Very sorry if I'm not following correctly.

  4. Support Staff 4 Posted by Dmytro Semenov on 30 Dec, 2012 04:25 PM

    Dmytro Semenov's Avatar


    I don't recommend doing any code modifications like this if you're not experienced in web development.

    You need to pass markup of your player inside videoObj variable:

    slider.ev.on('rsOnCreateVideoElement', function(e, url) {
            // url - path to video from data-rsVideo attribute
            // slider.videoObj - jQuery object that holds video HTML code
            // slider.videoObj must be IFRAME, VIDEO or EMBED element, or have class rsVideoObj
            slider.videoObj = $('<h1>You should put here your code for video player. Video URL:' + url + '</h1>');


  5. 5 Posted by edwardshephard on 31 Dec, 2012 03:11 PM

    edwardshephard's Avatar

    Okay thanks

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac