Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

OverView

This document should be used in conjunction with the “Implementation of Stream Measurement for BARB Barb TV Player Report” document.

...

This document describes in simple terms, the stages when integrating the streaming measurement, regardless of the host application.

Application

General

To measure any player – even proprietary ones – an adapter to the specific player can be used to pass on data to the sensors of the measurement system. This adapter provides the following three functions:

Code Block
languagejava
var myAdapter = {
"getMeta" : function(id) {
return {
"pl" :"own player",
"plv" :"version1",
"sx" : screen.width,
"sy" : screen.height }
},
"getDuration" : function(id) {
return streamlength in seconds;
},
"getPosition" : function(id) {
return new Date().getTime() / 1000;
}
};


FunctionDescription
getMetais used to acquire a description of the player and the available screen area.
By calling this function a return of an object with the following attributes is expected:
  • pl player description
  • plv player version
  • sx screen width in pixel
  • sy screen height in pixel
getDurationis used to acquire the total duration of the stream in seconds. If this cannot be done (because it is e.g. a live stream) 0 should be returned.
getPosition

is used to acquire the current position in the stream. The function delivers the current play position in seconds.
This function is also used to determine the intervals within the streams being played, skipped or stopped.


Info

By calling the object to be measured (from the first parameter of the call to sensors.track(…)) it will be transmitted to all functions.

Example for a proprietary player

Code Block
languagexml
<html>
<head>
<title>spring sensors</title>
<script src="springstreams.js"></script>
</head>
<body onunload="unload();">
<script type="text/javascript">
var sensors = new SpringStreams("test"); 
var adapter = {
	"getMeta" : function() {
		return {
			"pl" :"own player",
			"plv" :"version1",
			"sx" : screen.width,
			"sy" : screen.height
		}
	},
	"getDuration" : function() {
		return streamlength in seconds;
	},
	"getPosition" : function() {
		return new Date().getTime() / 1000;
	}
};
var desc = {
	"stream": "videos/teststream",
	"cq": "342579889"
}
sensors.track("someid", desc, adapter);
// uncomment for debugging
//	sensors.debug = function(v) {
//		window.status = v;
//	}
function unload() {
	sensors.unload();
        // give time for submission
	var start= new Date(); var now = null; do now = new Date();

Standard Video Stream

The regular reading of the current play head position allows the tracking of all actions on a stream.
Winding operations (RWD or FFWD) can be identified due to the change in current position of the play head.
Stop or pause operations are identified by the fact, that the current position of the play head does not change.
“User actions and operations, like stop or pause, are not measured directly (this is not an event based measurement)
but are instead derived from measuring the current position of the play head in the stream”.

Streams in parallel Measurement

The library sensor is able to measure several streams in parallel.
Each of the streams that are started with the “track” method can be measured and controlled independently.
The rules for Standard Video Stream apply to ALL streams being measured.

Glossary

MethodDescription
Track Method
“Registers the content to be measured via the description object on the sensor”
  • The streaming content and the description object are transmitted to the sensor via the method “track”
  • From this point, the current position of the play head within the stream is tracked
Info

When measuring multiple streams they MUST each be registered with unique coding


Stop Method
“Stops measurement of the stream programmatically”
  • The measurement of the stream is stopped; it does send the current state of the measurement to the measurement system
Info

If the stream should be measured again (continued) after the method stop has been called, the method “track” must be called again


Unload Method
“Terminates all measurement”
  • This call sends the current state of the measurement to the measurement system and then terminates all measurements.
Info

There any areas of unknown with differing player types:

    • On an iOS platform this method is automatically called by the library if the video stream goes into the background
    • On an Android platform this method MAY not be the case. Each platform should be accessed separately and adjusted accordingly

...



A basic overview flow diagram can be seen here:

Step-by-Step Examples

Standard (Simple) Viewing Stream

...


    Video Load, user selects a programme and the video stream starts – The library sensor is started by calling “track” method.  NO measurement is made at this point.

...

    Commercials NOT measured.

Standard (Simple) Viewing Stream with Rewind

...


    Video Load, user selects a programme and the video stream starts – The library sensor is started by calling “track” method.  NO measurement is made at this point.

...

    Commercials NOT measured.

Standard Viewing Stream with FFWD (Fast Forward)

...


    Video Load, user selects a programme and the video stream starts – The library sensor is started by calling “track” method.  NO measurement is made at this point.

...

    Commercials NOT measured.

Standard Viewing Stream with Pause period (15 mins)

...


    Video Load, user selects a programme and the video stream starts – The library sensor is started by calling “track” method.  NO measurement is made at this point.

...

    Commercials NOT measured.

Standard Viewing Stream with Programme sent to Background

...


    Video Load, user selects a programme and the video stream starts – The library sensor is started by calling “track” method.  NO measurement is made at this point.

...

    Commercials NOT measured.

Standard Viewing Stream with Programme sent to Background and Returned to Foreground

...


    Video Load, user selects a programme and the video stream starts – The library sensor is started by calling “track” method.  NO measurement is made at this point.

...

    Commercials NOT measured.

Viewing Stream with Restart or Rewind

...


    Video Load, user selects a programme and the video stream starts – The library sensor is started by calling “track” method.  NO measurement is made at this point.

...

    Commercials NOT measured.

Viewing Stream with FFWD (Immediate)

...


    Video Load, user selects a programme and the video stream starts – The library sensor is started by calling “track” method.  NO measurement is made at this point.

...

     Actual stream minutes measured. NOTE: The period of viewing measured is only from the play head position 500.

Abnormal Termination of Viewing Stream

...


    Video Load, user selects a programme and the video stream starts – The library sensor is started by calling “track” method.  NO measurement is made at this point.

...

    Commercials NOT measured.

Abnormal Termination and Resume Viewing Stream

...


    Video Load, user selects a programme and the video stream starts – The library sensor is started by calling “track” method.  NO measurement is made at this point.

...

    Elapsed time NOT measured.

NEW measurement stream.

Abnormal Termination and Restart Viewing Stream

...


    Video Load, user selects a programme and the video stream starts – The library sensor is started by calling “track” method.  NO measurement is made at this point.

...

    Elapsed time NOT measured.

NEW measurement stream.

Measuring a Standard Viewing Stream and the Commercial Stream

...


    Video Load, user selects a programme and the video stream starts.

...

    Commercial viewing measured. (Stream 2)

Measuring a Viewing Stream and Multiple Commercial Streams

...


    Video Load, user selects a programme and the video stream starts.

...

  • A single measurement of the video stream
  • 3 separate measurement streams of the commercial breaks within the video stream

...