sensors-xbox
sensors-xbox Documentation

This is a quick overview on how to use the KMStreamingSensor library.

1.

//Create the KMStreamingSensor library using the appropriate tracking site
KMStreamingSensor<IStreamAdapater> streams = KMStreamingSensor<IStreamAdapater>.getInstance("test");

This has to be a single instance and should be created upon app start

2.

//Create stream adapter by implementing IStreamAdapter
var playerData = new ExampleAdapter(mediaElement.MediaPlayer);

The adapter for the KMStreamingSensor library. The implementation depends on the player used.

3.

Dictionary<String, Object> dict = new Dictionary<string, object>();
//Add optional properties
dict.Add("cq", "4711");

These properties can further specify the stream, if you have to set certain properties, normally these would be provided to you. You may just provide an empty Dictionary.

4.

//Start tracking the stream
streams.Track(playerData, dict);

This actually starts the tracking and should be called right before starting the video

5.

//when finished stop the adapter
streams.Unload();
}

This finalizes the Stream and should be called any time the video is interrupted (i.e. application goes to background) or the video is finished.

For detailed information, see the attached document 'Streaming_Implementation.pdf'