Building a tvOS Application
-
Upload
michiel-de-mey -
Category
Software
-
view
139 -
download
0
Transcript of Building a tvOS Application
<?xml version="1.0" encoding="UTF-8" ?><document>
<descriptiveAlertTemplate><title>Terms of Service</title><description>Lorem ipsum (…)</description><row>
<button><text>Accept</text>
</button><button>
<text>Decline</text></button>
</row></descriptiveAlertTemplate>
</document>
TV Markup Language
TV Markup Language
TV Javascript Framework• Supports some standard DOM classes
DOMParser
Event
XMLSerializer
• Has some tvOS specific classes you can work with
XMLHttpRequest
MediaItem
Storage
• Not through HTML <audio> or <video> element
<audio> element is for background audio
• Through Javascript
var player = new Player();var playlist = new Playlist();var mediaItem = new MediaItem("audio", audioURL);
player.playlist = playlist;player.playlist.push(mediaItem);player.present();
TV Javascript FrameworkPlaying Video/Audio?
• `Window` object is non-existent
Use `App` variable instead.
• No `Promise` support
Use core-js
https://github.com/zloirock/core-js
• JavaScript inconsistencies
Math.random().toString(36)
TV Javascript Framework
Official Resources
• Creating a Client-Server App
• TVJS Framework Reference
• TVML Language Reference
• tvOS Sample Code
Source Code• Xcode Project:https://github.com/MichielDeMey/cumulus-tv-xcode
• Client Project: https://github.com/MichielDeMey/cumulus-tv
• OAuth Server: https://github.com/MichielDeMey/tvos-oauth-flow