How to play hls inside VAST 4.2 using open-source players? - html5-video

My site uses video.js with the videojs-ima plugin, but it didn't work with hls inside VAST.
I tested the xml using the Google service https://googleads.github.io/googleads-ima-html5/vsi/ and I see the error Ad error: AdError 400: There was an error playing the video ad. Caused by: Error: Error: There was an error playing the video ad.
I tried the videojs-vast-vpaid plugin, but it throws an error about the inability to work with VAST 4.2.
I tried other free players - plur, openplayerjs, fluid player-but none of them worked with my xml.
my VAST 4.2 sample xml looking like that (Warning! NSFW content inside):
<VAST xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.iab.com/VAST" version="4.2">
<Ad id="1" adType="video">
<InLine>
<AdSystem version="1">stripcash.com</AdSystem>
<AdTitle>Naked girl get cum on face</AdTitle>
<Creatives>
<Creative sequence="1" id="1">
<Linear skipoffset="00:00:05">
<Duration>00:00:05</Duration>
<MediaFiles>
<MediaFile id="1" delivery="progressive" type="video/mp4" width="480" height="640">
<![CDATA[ https://b-hls-25.strpst.com/hls/48371204/48371204.m3u8 ]]>
</MediaFile>
</MediaFiles>
<VideoClicks>
<ClickThrough id="1">
<![CDATA[ https://go.xxxjmp.com/api/goToTheRoom?campaignId=59eb46ec7c05df0507091.......]]>
</ClickThrough>
</VideoClicks>
</Linear>
<UniversalAdId idRegistry="unknown">unknown</UniversalAdId>
</Creative>
</Creatives>
<Impression id="">
<![CDATA[ https://go.xxxjmp.com/eye.gif?campaignId=59eb46ec7c05df0507091cccc8a....... ]]>
</Impression>
</InLine>
</Ad>
</VAST>

The IMA SDK creates it's own video element to play the creative. That will only be able to formats the browser can natively support. HLS would work on Safari.

Related

RTI DDS creating own data types

I am working on a .Net example where I define my own data type using RTI Connext DDS.
Instead of creating the application from the beginning, I got help from the source code of the hello_world_xml_dynamic example in rti_workspace directory. I have made several changes to the USER_QOS_PROFILES.xml file to create my own data type and changes its name to MY_PROFILES.xml
But when I compile the application and run it from the command line, I get the following error:
DDS_DomainParticipantFactory_create_participant_from_config_w_paramsI:ERROR: Profile library 'MyParticipantLibrary::PublicationParticipant' not found
! Unable to create DDS domain participant
The line of code that catching the error:
if (this.participant == null)
{
this.participant = DDS.DomainParticipantFactory.get_instance().
create_participant_from_config(
"MyParticipantLibrary::PublicationParticipant");
if (this.participant == null)
{
Console.Error.WriteLine("! Unable to create DDS domain participant");
return;
}
}
this is the configuration file MY_PROFILES.xml :
<!--
RTI Data Distribution Service Deployment
-->
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/6.0.1/rti_dds_profiles.xsd">
<!-- Qos Library -->
<qos_library name="qosLibrary">
<qos_profile name="DefaultProfile">
</qos_profile>
</qos_library>
<!-- types -->
<types>
<struct name="FlightData">
<member name="Latitude" type="double"/>
<member name="Longitude" type="double"/>
<member name="Altitude" type="double"/>
</struct>
</types>
<!-- Domain Library -->
<domain_library name="MyDomainLibrary" >
<domain name="FlightDataDomain" domain_id="0">
<register_type name="FlightDataType"
type_ref="FlightData" />
<topic name="FlightDataTopic"
register_type_ref="FlightDataType">
<topic_qos name="FlightData_qos"
base_name="qosLibrary::DefaultProfile"/>
</topic>
</domain>
</domain_library>
<!-- Participant library -->
<domain_participant_library name="MyParticipantLibrary">
<domain_participant name="PublicationParticipant"
domain_ref="MyDomainLibrary::FlightDataDomain">
<publisher name="MyPublisher">
<data_writer name="FlightDataWriter"
topic_ref="FlightDataTopic"/>
</publisher>
</domain_participant>
<domain_participant name="SubscriptionParticipant"
domain_ref="MyDomainLibrary::FlightDataDomain">
<subscriber name="MySubscriber">
<data_reader name="FlightDataReader"
topic_ref="FlightDataTopic">
<datareader_qos name="FlightData_reader_qos"
base_name="qosLibrary::DefaultProfile"/>
</data_reader>
</subscriber>
</domain_participant>
</domain_participant_library>
</dds>
where am i making a mistake?
Your XML file looks correct. From the 'not found' error message, it seems that you may not have taken the right steps to instruct your application to load that profiles-file MY_PROFILES.xml to actually learn about your desired Participant. You can easily verify that this is the case by introducing an error in your XML file (for example by incorrectly renaming one tag) and rerun your application. If it does not complain about the syntax or schema of the XML, then your file did not get loaded and this hypothesis is correct.
If that turns out to be your problem indeed, then you have several options to fix that. They are listed in the User's Manual section 18.5 How to Load XML-Specified QoS Settings.

Why this dash manifest keeps the player stuck until streams are downloaded?

I have this manifest file below . The issue is that the player waits for the streams to download completely before to start playing which is bad for the user experience. Any idea how to fix it? I expected the player to start range requests and feed media source with partial requests instead to wait for the streams to completely download.
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediaPresentationDuration="PT30M67.6S" minBufferTime="PT2S">
<ProgramInformation></ProgramInformation>
<Period id="0" start="PT0.0S">
<AdaptationSet id="0" contentType="video" segmentAlignment="true" bitstreamSwitching="true" lang="und">
<Representation id="0" mimeType="video/webm" codecs="vp9" bandwidth="770153" width="854" height="480" frameRate="23421/1000">
<BaseURL>https://liveradio.s3.eu-central-1.amazonaws.com/video.webm</BaseURL>
<SegmentList duration="1840613" startNumber="1">
<Initialization range="0-219"/>
<SegmentURL indexRange="220-6592"/>
</SegmentList>
</Representation>
</AdaptationSet>
<AdaptationSet id="1" contentType="audio" segmentAlignment="true" bitstreamSwitching="true" lang="und">
<Representation id="1" mimeType="audio/webm" codecs="opus" bandwidth="115412" audioSamplingRate="48000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<BaseURL>https://liveradio.s3.eu-central-1.amazonaws.com/audio.webm</BaseURL>
<SegmentList duration="1840641" startNumber="1">
<Initialization range="0-258"/>
<SegmentURL indexRange="259-3444"/>
</SegmentList>
</Representation>
</AdaptationSet>
</Period>
</MPD>
You seem to be using a mix of the DASH 'live' profile approach and the 'on-demand' profile one - you can see the profile in the profiles="urn:mpeg:dash:profile:isoff-live:2011" at the top of your manifest.
At a very high level the difference is:
'live' profile manifests contain a list of urls for each segment to be downloaded.
'on-demand' profile manifests contain a URL to a file and an index to where the segments can be found in the file, so the client can download chunks as it wants.
DASH is a complex specification and it may be that some players will accept some mixes of profiles and others not, and not all players support all features - for example Shaka player claims not to support 'indexRange' (or did in 2017: https://github.com/google/shaka-player/issues/765)

Companion banner not showing up in Google HTML5 Video Player

I am trying to test a video Ad in Google HTML5 video player. However when I run the ad, the companion banner is not showing up. Here is the companion banner exert from the VAST:
<Creative id="65393060" sequence="1">
<CompanionAds>
<Companion id="65393060" width="300" height="250">
<StaticResource creativeType="image/jpeg"><![CDATA[https://upload.wikimedia.org/wikipedia/commons/2/24/Ad-MediumRectangle-300x250.jpg]]></StaticResource>
<TrackingEvents>
<Tracking event="creativeView"><![CDATA[https://googleads4.g.doubleclick.net/pcs/view?xai=AKAOjstsTn-EaW1qCpFP8ZfnnD3WA-FvBRQQqjL6Zsorvcg_b2mBA825XyOmESX3oEFPWEYsBfGOZnwFDoULoM_W2XoJotTnj5_cHibpaP0QuuKj&sig=Cg0ArKJSzHCpDSHDWEEtEAE&urlfix=1&adurl=]]></Tracking>
</TrackingEvents>
<CompanionClickThrough><![CDATA[https://adclick.g.doubleclick.net/pcs/click?xai=AKAOjstsTn-EaW1qCpFP8ZfnnD3WA-FvBRQQqjL6Zsorvcg_b2mBA825XyOmESX3oEFPWEYsBfGOZnwFDoULoM_W2XoJotTnj5_cHibpaP0QuuKj&sig=Cg0ArKJSzCLZtsCz6JLn&urlfix=1&adurl=https://www.adobe.com/marketing-cloud/customer-experience.html%3Fsdid%3D162BDWN7%26mv%3Ddisplay]]></CompanionClickThrough>
</Companion>
</CompanionAds>
</Creative>
Can anyone tell me why? I was testing this here:
https://developers.google.com/interactive-media-ads/docs/sdks/html5/vastinspector
Your Companion Ad config looks fine. I'd copied the sampel-vast.xml from google and added your Companion - so it looks like:
<VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd" version="3.0">
<Ad id="...">
<InLine>
<AdSystem>...</AdSystem>
<AdTitle>...</AdTitle>
<Description>...</Description>
<Error>...</Error>
<Impression>...</Impression>
<Creatives>
<Creative id="..." sequence="1">
<Linear skipoffset="...">...</Linear>
</Creative>
<Creative id="..." sequence="1">
<CompanionAds>
<Companion id="..." width="300" height="250">
<StaticResource creativeType="image/jpeg"><![CDATA[https://upload.wikimedia.org/wikipedia/commons/2/24/Ad-MediumRectangle-300x250.jpg]]></StaticResource>
<TrackingEvents>
<Tracking event="creativeView"><![CDATA[https://googleads4.g.doubleclick.net/pcs/view?xai=AKAOjstsTn-EaW1qCpFP8ZfnnD3WA-FvBRQQqjL6Zsorvcg_b2mBA825XyOmESX3oEFPWEYsBfGOZnwFDoULoM_W2XoJotTnj5_cHibpaP0QuuKj&sig=Cg0ArKJSzHCpDSHDWEEtEAE&urlfix=1&adurl=]]></Tracking>
</TrackingEvents>
<CompanionClickThrough><![CDATA[https://adclick.g.doubleclick.net/pcs/click?xai=AKAOjstsTn-EaW1qCpFP8ZfnnD3WA-FvBRQQqjL6Zsorvcg_b2mBA825XyOmESX3oEFPWEYsBfGOZnwFDoULoM_W2XoJotTnj5_cHibpaP0QuuKj&sig=Cg0ArKJSzCLZtsCz6JLn&urlfix=1&adurl=https://www.adobe.com/marketing-cloud/customer-experience.html%3Fsdid%3D162BDWN7%26mv%3Ddisplay]]> </CompanionClickThrough>
</Companion>
</CompanionAds>
</Creative>
</Creatives>
<Extensions>...</Extensions>
</InLine>
</Ad>
</VAST>
and it works.
Potential issues could be:
Creative \ sequence missmatch (Linear part not provided in question)
Companion \ sequence needs to match Linear \ sequence
CORS resp. Access-Control-Allow-Origin problems
If you see errors in the console of your browser regarding Access-Control-Allow-Origin problems, you might want to edit your server configuration.
A fast solution would be for example to edit .htaccess file in your apache www directory - like:
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin https://imasdk.googleapis.com
Header set Access-Control-Allow-Credentials true
</IfModule>
If this wasn't helpfull at all, you will need to add some more informations to your question. Like:
browsers console output
full vast.xml
server specifics resp. which option you choosed VAST XML or VAST TAG
Have a nice day.

How could include javascript libraries on a wirecloud operator

I am trying to develop a wirecloud operator but I don't know how to include a javascript library (i.e. jquery) on the config.xml except the main.js file. I tried to include the jquery library on the config.xml just like the main.js way, using different wire:index, but it did not work.
Is there any way to include a second JS library?
Yes, you can have more than one javascript file in operators. I think your problem is related to the RDF syntax that is a bit weird. Anyway, the following snippet is an example of how to include jquery and a main.js file using RDF/XML:
<usdl:utilizedResource>
<usdl:Resource rdf:about="js/jquery.min.js">
<wire:index>0</wire:index>
</usdl:Resource>
</usdl:utilizedResource>
<usdl:utilizedResource>
<usdl:Resource rdf:about="js/main.js">
<wire:index>1</wire:index>
</usdl:Resource>
</usdl:utilizedResource>
Alternatively, if you are using the Mashup portal at FIWARE Lab, you can make use of the new XML format that is going to be available on WireCloud 0.7.0 (currently the Mashup portal is running release candidate of that version). This is an example of the new format:
<?xml version='1.0' encoding='UTF-8'?>
<operator xmlns="http://wirecloud.conwet.fi.upm.es/ns/macdescription/1" vendor="CoNWeT" name="ngsi-source" version="3.0">
<details>
<title>NGSI source</title>
<homepage>https://github.com/wirecloud-fiware/ngsi-source</homepage>
<authors>Álvaro Arranz García <aarranz#conwet.com></authors>
<email>aarranz#conwet.com</email>
<image>images/catalogue.png</image>
<description>Retrieve Orion Context Broker entities and their updates in real time.</description>
<longdescription>DESCRIPTION.md</longdescription>
<license>AGPLv3+ w/linking exception</license>
<licenseurl>http://www.gnu.org/licenses/agpl-3.0.html</licenseurl>
<doc>doc/userguide.md</doc>
<changelog>doc/changelog.md</changelog>
</details>
<requirements>
<feature name="NGSI"/>
</requirements>
<preferences>
<preference name="ngsi_server" type="text" label="NGSI server URL" description="URL of the Orion Context Broker to use for retrieving entity information" default="http://orion.lab.fi-ware.org:10026/"/>
<preference name="ngsi_proxy" type="text" label="NGSI proxy URL" description="URL of the Orion Context Broker proxy to use for receiving notifications about changes" default="http://mashup.lab.fi-ware.org:3000/"/>
<preference name="ngsi_entities" type="text" label="NGSI entity types" description="A comma separated list of entity types to use for filtering entities from the Orion Context broker. Thies field cannot be empty." default="Node, AMMS, Regulator"/>
<preference name="ngsi_id_filter" type="text" label="Id pattern" description="Id pattern for filtering entities. This preference can be empty, in that case, entities won't be filtered by id." default=""/>
<preference name="ngsi_update_attributes" type="text" label="Monitored NGSI Attributes" description="Attributes to monitor for updates. Currently, the Orion Context Broker requires a list of attributes to monitor for changes, so this field cannot be empty." default="Latitud, Longitud, presence, batteryCharge, illuminance, ActivePower, ReactivePower, electricPotential, electricalCurrent"/>
</preferences>
<wiring>
<outputendpoint name="entityOutput" type="text" label="Provide entity" description="Every change over each entity fires an event" friendcode="entity"/>
</wiring>
<scripts>
<script src="js/other.dependency.js"/>
<script src="js/main.js"/>
</scripts>
</operator>
You can found more documentation about this new format at this link.
Finally, I came off to include other JS files using RDF/XML on a wirecloud operator. Firstly, I use the following code on the config.xml file:
<usdl-core:utilizedResource rdf:about="js/jquery-1.10.2.min.js">
<wire:index>0</wire:index>
</usdl-core:utilizedResource>
<usdl-core:utilizedResource rdf:about="js/main.js">
<wire:index>1</wire:index>
</usdl-core:utilizedResource>
Also, the included JS files have to be declared as follows:
<wire:Operator rdf:about="http://wirecloud.conwet.fi.upm.es/ns/widget#Operator">
...
<usdl-core:utilizedResource rdf:resource="js/jquery-1.10.2.min.js"/>
<usdl-core:utilizedResource rdf:resource="js/main.js"/>
....
</wire:Operator>

How to add Link to Story via VersionOne REST API?

I'm able to create new Story via POST to /VersionOne/rest-1.v1/Data/Story with corresponding XML payload. Setting all attributes (including relational) works like a charm. However I'm unable to figure out how to add a Link asset to the Story asset.
When I try POSTing to /VersionOne/rest-1.v1/Data/Link with following XML payload:
<Asset href='/VersionOne/rest-1.v1/New/Link'>
<Attribute name='AssetType' act='set'>Link</Attribute>
<Relation name='Asset' act='set'>
<Asset href='/VersionOne/rest-1.v1/Data/Story/123' idref='Story:123'/>
</Relation>
<Attribute name='OnMenu' act='set'>true</Attribute>
<Attribute name='URL' act='set'>http://my.example.com</Attribute>
<Attribute name='Name' act='set'>My Link Title</Attribute>
</Asset>
The server however returns:
<Error href="/VersionOne/rest-1.v1/Data/Link">
<Message>Violation'Readonly'Link.AssetType</Message>
<Exception class="VersionOne.DataException">
<Message>Violation'Readonly'Link.AssetType</Message>
</Exception>
</Error>
Seems like adding links is prohibited but actually I can add Links via the standard web interface without issues.
My original idea was to create Link asset first and then update the Story with respective relational attribute pointing to that Link asset.
Any ideas anyone?
Thanks!
(I'm using JavaScript/jQuery)
My bad. The <Attribute name='AssetType' act='set'>Link</Attribute> attribute in the POST payload is obviously wrong - it is trying to set the asset's type (link) which does not make sense since I'm stating the type in URL already. It works perfectly without the attribute (as expected).