test/post-test.php
author durandn
Tue, 01 Sep 2015 15:10:17 +0200
changeset 1044 d8339b45edc4
parent 931 0fdce6e14748
permissions -rw-r--r--
Added support for defining a "time range" for a Playable to set the time boundaries of what can be played by the diffenrent players (Popcorn and HtmlPlayer for now). Added option in Segment widget to define a timerange on click.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
928
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     1
<?php
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     2
931
0fdce6e14748 Created Tagger widget for FTV project
veltr
parents: 928
diff changeset
     3
$data = json_decode(file_get_contents("php://input"));
928
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     4
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     5
if (!isset($data->annotations[0]->id)) {
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     6
    $data->annotations[0]->id = uniqid("annotation_");
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     7
}
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     8
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     9
if (!isset($data->annotations[0]->type)) {
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
    10
    $data->annotations[0]->type = uniqid("annotationType_");
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
    11
}
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
    12
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
    13
print_r(json_encode($data));
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
    14
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
    15
?>