Tagged: ,

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #1346775

    Hey guys,

    Not sure if I’m missing something here, as I remember a few releases ago you added video schema in, but I can’t seem to get the schema validators to know about video elements on a page. See private info for an example.

    I can see the VideoObject markup in the HTML, but other than that it never appears to be recognised as valid schema?

    Sorry if I’m missing something really obvious here, but would appreciate you taking a look.

    Thanks

    Tim

    #1347092

    Hey Tim,

    Thank you for the inquiry.

    Are you using the video element? Every element with the avia_markup_helper function in the shortcode file should have the VideoObject schema in them.

    $markup_video = avia_markup_helper( array( 'context' => 'video', 'echo' => false, 'custom_markup' => $meta['custom_markup'] ) );
    

    Best regards,
    Ismael

    #1347334

    Hey Ismael,

    Yes, using the ALB Video Element.

    I can see itemtype=”https://schema.org/VideoObject” in the code on the page, (you can check using the link I posted in the opening post) but my question relates to schema validators not registering the page as having any video content. Again, if you use the link I posted you can see there are no elements detected that contain video (unless I’m missing it somewhere?).

    Could you take a look at what’s going on please?

    Thanks a lot

    Tim

    #1347377

    Hi,

    Thank you for the info.

    Is the video object properly detected when the JSON-LD schema from yoast-schema-graph is disabled? Looks like more info are retrieved from the yoast JSON-LD instead of the actual document.

    Best regards,
    Ismael

    #1347616

    Hey Ismael,

    On the dev site we no longer have Yoast, you can take a look below

    Regards

    Tim

    #1347957

    Hi Tim,

    I’ve not really digged into schema.org.

    But having a look at https://schema.org/VideoObject and the examples at the bottom of the page the only idea I have would be to add a meta tag like:

    
    <meta itemprop="contentUrl" content="link_to_video" />
    

    right after the opening div of the video element.

    Could you check if this helps please?

    Best regards,
    Günter

    #1349673

    Hi Gunter,

    We tried adding that in, but it only resulted in an error in the schema.org validator (contentURL can’t be part of WebPage – I think that was the error if I recall properly).

    Tim

    #1349718

    Hi,

    Thank you for the update.

    It seems to work better if we use a separate JSON-LD markup for the video element. In the video.php file, look for this block of code around line 704..

    	$output = '';
    				$output .= $style_tag;
    				$output .= "
    <div {$meta['custom_el_id']} class='{$container_class}' {$markup_video} data-original_url='{$src}'>";
    				$output .=		$output_html;
    				$output .= '</div>';
    

    .., then replace it with this one.

    				$json = '    <script type="application/ld+json">
    				{
    				  "@context": "https://schema.org",
    				  "@type": "VideoObject",
    				  "name": "Another video object.",
    				  "thumbnailUrl": [
    					"https://example.com/photos/1x1/photo.jpg",
    					"https://example.com/photos/4x3/photo.jpg",
    					"https://example.com/photos/16x9/photo.jpg"
    				   ],
    				  "uploadDate": "2016-03-31T08:00:00+08:00",
    				  "duration": "PT1M54S",
    				  "contentUrl": "https://www.example.com/video/123/file.mp4",
    				  "embedUrl": "https://www.example.com/embed/123",
    				  "interactionStatistic": {
    					"@type": "InteractionCounter",
    					"interactionType": { "@type": "WatchAction" },
    					"userInteractionCount": 5647018
    				  },
    				  "regionsAllowed": "US,NL"
    				}
    				</script>';
    
    				$output = '';
    				$output .= $style_tag;
    				$output .= "
    <div {$meta['custom_el_id']} class='{$container_class}' {$markup_video} data-original_url='{$src}'>";
    				$output .= $json;
    				$output .=		$output_html;
    				$output .= '</div>';
    

    The validator should be able to recognize the video element as a separate object as shown in the screenshot below.

    // https://1drv.ms/u/s!AjjTfXSRbKTvwGG1fhkWkkzFci3X?e=x3G9bb

    This is based on the following documentation.

    // https://developers.google.com/search/docs/advanced/structured-data/video

    Best regards,
    Ismael

    #1349719

    Hi,

    UPDATE: You should also edit the video.js file, look for this code around line 88..

    container.html( video );
    

    .. and replace it with:

    container.append( video );
    container.find('.av-video-tmpl').remove();
    

    Best regards,
    Ismael

    #1351617

    Hi Ismael,

    Apologies for the long delay, we did test this and then completely forgot to get back to you about it.

    So unfortunately it seemed like Rank Math still couldn’t pickup the video element on the page.

    Also we were concerned about what seemed to be hard coded values in your code above? Would that be a manual implementation?

    To be honest, it’s been a few weeks since we tested it so I’m probably not remembering everything, but hopefully you’ve been able to test it as well.

    Thanks.

    #1351894

    Hi,

    Also we were concerned about what seemed to be hard coded values in your code above? Would that be a manual implementation?

    Yes, it is a manual implementation with hard coded values, just to check if the schema validator will be able to pick up the video object when using a JSON-LD markup. This quick modification works on our end.

    // https://1drv.ms/u/s!AjjTfXSRbKTvwGG1fhkWkkzFci3X?e=x3G9bb

    It would be nice if you can test it on your installation just to confirm.

    Where do you actually see the issue with RankMath? Please provide a screenshot using imgur, savvyify or dropbox. Thanks.

    Best regards,
    Ismael

    #1358225

    Hi Ismael,

    Sorry for the delay.

    Did these changes go into production with the Rank Math implementation a release or two ago? If so, RM still can’t automatically find videos on pages, like it can with a Gutenberg video block for example.

    Thanks

    Tim

    #1358291

    Hi,

    This is not yet included in the previous implementation, which focuses on the plugins’ analysis tools. We are currently testing an updated version of it.

    For the schema pieces or json-ld, we created a plugin. Please check this previous thread.

    // https://kriesi.at/support/topic/yoast-schema-integration/#post-1356230

    Only the FAQ markup or accordion element is supported at the moment.

    Best regards,
    Ismael

    #1358337

    Hi Ismael,

    Thanks for the reply.

    Looking at the other post and the plugin, am I right in thinking that plugin is only for Yoast though and not Rank Math?

    In this thread I was asking more about Rank Math’s integration.

    Thanks

    Tim

    #1358434

    Hi,

    Yes, the plugin is a wrapper for the wpseo_schema_graph_pieces filter, which appends additional schema markup to Yoast’s JSON-LD or schema graph.

    In this thread I was asking more about Rank Math’s integration.

    Are you referring to the plugin’s analysis tool? If yes, in the updated version of the implementation, the analysis tool will be able to recognize image and video elements inside any of the editors (ALB, classic, block).

    For the structured data or schema markup, these documentations might help.

    // https://rankmath.com/kb/rich-snippets/
    // https://rankmath.com/kb/import-schema-markup/

    You may need to create and import a custom markup for video elements.

    Best regards,
    Ismael

    #1358504

    Hi Ismael,

    Great thanks for the explanation. I look forward to trying the new version.

    Regards

    Tim

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘ALB Video Element & VideoObject Schema?’ is closed to new replies.