Dan
Dan

Reputation: 51

Playing video in the mirror API

I'm a little confused about playing videos in the Mirror API

Are there any restrictions for using HTML tags in "html" field?...

Alain says

Blocked HTML elements: These elements, and their contents, are removed from html payloads. Document headers: head, title Embeds: audio, embed, object, source, video

However looking at the documentation ...

https://developers.google.com/glass/v1/reference/timeline/insert

Accepted Media MIME types: image/* , audio/* , video/*

So ... I'm guessing that I can attach video but not embed video? Seems like a subtle distinction, so an app would have to have a main HTML card and a sub menu choice to view a video. Is this correct?

Upvotes: 4

Views: 695

Answers (1)

mimming
mimming

Reputation: 13954

Correct. HTML video elements are stripped from inserted timeline cards, but you can attach video. Video that is attached to timeline cards is played in full screen by a native player on Glass.

If you'd like to include video with other rich content, bundling is the way to go. You can accomplish this by specifying an HTML cover card and many video cards with the same timelineItem.bundleId.

Upvotes: 3

Related Questions