Jump to content

How to mark videos for Yandex.Video service


Tech Support

Recommended Posts

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

   {{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:

prefix="og: http://ogp.me/ns# video: http://ogp.me/ns#video"
 
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 4 months later...
On 1/10/2019 at 8:46 AM, Tech Support said:

Also add the following attribute to your <html> tag in header:


prefix="og: http://ogp.me/ns# video: http://ogp.me/ns#video"
 

Hello! is this the <html> tag: <html lang="{{$config.locale|default:$lang.header.default_lang}}">?

And on this page: Page component "include_header_general"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...