Announcement

Collapse
No announcement yet.

How to mark videos for Yandex.Video service

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to mark videos for Yandex.Video service

    Please add the following code to your header template to prepare your video pages for Yandex.Video:

    HTML Code:
        {{if $storage.video_view_video_view.video_id>0}}
            <meta property="og:url" content="{{$storage.video_view_video_view.canonical_url}}"/>
            <meta property="og:video" content="{{$config.project_url}}/embed/{{$storage.video_view_video_view.video_id}}"/>
            <meta property="og:type" content="video.other"/>
            <meta property="og:video:type" content="video/mp4"/>
            {{if $storage.video_view_video_view.file_dimensions.0>0}}
                <meta property="og:video:width" content="{{$storage.video_view_video_view.file_dimensions.0}}"/>
                <meta property="og:video:height" content="{{$storage.video_view_video_view.file_dimensions.1}}"/>
            {{/if}}
    
            {{if $page_og_description==''}}
                <meta property="og:description" content="{{$storage.video_view_video_view.title|mb_ucfirst}}"/>
            {{/if}}
    
            <meta property="video:duration" content="{{$storage.video_view_video_view.duration_minutes*60+$storage.video_view_video_view.duration_seconds}}"/>
            {{if $storage.video_view_video_view.tags_as_string}}
                <meta property="video:tag" content="{{$storage.video_view_video_view.tags_as_string}}"/>
            {{/if}}
    
            <meta property="ya:ovs:upload_date" content="{{$storage.video_view_video_view.post_date|replace:" ":"T"}}"/>
            <meta property="ya:ovs:adult" content="false"/>
            <meta property="ya:ovs:allow_embed" content="true"/>
            <meta property="ya:ovs:views_total" content="{{$storage.video_view_video_view.video_viewed}}"/>
            <meta property="ya:ovs:comments" content="{{$storage.video_view_video_view.comments_count}}"/>
            <meta property="ya:ovs:rating" content="{{$storage.video_view_video_view.rating*2}}"/>
            {{if $storage.video_view_video_view.is_hd==1}}
                <meta property="ya:ovs:quality" content="HD"/>
            {{/if}}
        {{/if}}
    Also add the following attribute to your <html> tag in header:

    HTML Code:
    prefix="og: http://ogp.me/ns# video: http://ogp.me/ns#video"
Working...
X