View Single Post
Old 06-04-2018, 03:16 PM  
MrT31
Confirmed User
 
MrT31's Avatar
 
Industry Role:
Join Date: Aug 2012
Posts: 54

I Use fluidplayer as a plugin

i cannot put url , put it can be found in plugin category in wordpress

Some on my wordpress theme need to grab the player in a custom field (e.g video_code)
and other in the php content as usual.

by example
with a normal smarttubescript xml format


with the preset Smart Script tube with kvs pro

Code:
screen_url->screen_url
screen->screen
clip_url->clip_url
flv->flv
mp4->mp4
duration->duration
paysite->paysite_title
Code:
if (isset($post['custom_fields']['mp4']) && strlen($post['custom_fields']['mp4'])) {
    $post['custom_fields']['flv'] = $post['custom_fields']['mp4'];
    unset($post['custom_fields']['mp4']);
}
$post['guid'] = $post['custom_fields']['clip_url'] . $post['custom_fields']['flv'];
if (!cseo_post_exists($post)) {
    $post['custom_fields']['duration'] = date('i:s', $post['custom_fields']['duration']);
    
    $screen = $post['custom_fields']['screen'];
    if (is_array($screen)) {
        $post['custom_fields']['thumb'] = $post['custom_fields']['screen_url'] . $screen[rand(0, count($screen) - 1)];
    } else {
        $post['custom_fields']['thumb'] = $post['custom_fields']['screen_url'] . $screen;
    }
    cseo_must_be_binary($post['guid']);
    cseo_must_be_binary($post['custom_fields']['thumb']);
    $post['post_excerpt'] = trim($post['post_excerpt']);
    $post['post_content'] = '[flv:' . $post['guid'] . ' ' . cseo_save_image($post['custom_fields']['thumb'], $post['post_title']) . ']';
    unset($post['custom_fields']['screen_url']);
    unset($post['custom_fields']['screen']);
    unset($post['custom_fields']['clip_url']);
    unset($post['custom_fields']['flv']);
} else {
    $post = false;
}

I would to replace

Code:
$post['post_content'] = '[flv:' . $post['guid'] . ' ' . cseo_save_image($post['custom_fields']['thumb'], $post['post_title']) . ']';
by the fluid player 's short code

this one
Code:
[fluid-player video=”url of the video grabbed in the xml ″ vast_file=”wanttoberichxml” vtt_file=”urlthumbsvtt” vtt_sprite=”urlthumbs.jpg” layout=”default”
or this one

Code:
[fluid-player-extended
    vast_file="wanttoberichxml"
    layout="default"
    auto-play="autoPlay"
    logo="/mygreatlogopng"
    logo-position="top right"
    logo-opacity=".8"
    ad-text="adText"
    ad-cta-text="adCTAText"
    html-on-pause-block-width="300"
    html-on-pause-block-height="300"
    responsive="true"]

    [fluid-player-multi-res-video]
        [
            {"label": "720", "url": "url of the video grabbed in the xml "},
            {"label": "480", "url": "url of the video grabbed in the xml "}
        ]
    [/fluid-player-multi-res-video]

    [fluid-player-html-block]
        <div>
            <img src="/pubbannerpng" />
        </div>
    [/fluid-player-html-block]

[/fluid-player-extended]
the most important is to grab the url of the video and put in those short code



thanks again
MrT31 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote