Skip to content
Permalink
Browse files
CB-10701 CB-7117 android: Add manual test to check getting metadata
  • Loading branch information
matrosov-nikita authored and vladimir-kotikov committed Oct 26, 2016
1 parent 26f9ad1 commit 7e28e9cb1d60e54ecb1e29e61d38329d9c0e62f0
Showing 1 changed file with 18 additions and 0 deletions.
@@ -134,6 +134,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
log('Audio captured: ' + path);
var m = new Media(path);
m.play();
getFileMetadata(mediaFiles[0]);
}

function captureAudioFail(e) {
@@ -213,6 +214,23 @@ exports.defineManualTests = function (contentEl, createActionButton) {
source_vid.src = path;
vid.appendChild(source_vid);
document.getElementById('video_container').appendChild(vid);
getFileMetadata(mediaFiles[0]);
}

function getFileMetadata(mediaFile) {
mediaFile.getFormatData(getMetadataWin, getMetadataFail);
}

function getMetadataWin(metadata) {
var strMetadata =
"duration = " + metadata.duration + '\n' +
"width = " + metadata.width + '\n' +
"height = " + metadata.height;
log(strMetadata);
}

function getMetadataFail(e) {
log("Error getting metadata: " + e.code);
}

function captureVideoFail(e) {

0 comments on commit 7e28e9c

Please sign in to comment.