[Metadata] Added getArtwork method of MetadataFileHandle 64/245064/6
authorPiotr Kosko <p.kosko@samsung.com>
Wed, 30 Sep 2020 06:23:20 +0000 (08:23 +0200)
committerPiotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Tue, 24 Nov 2020 07:56:37 +0000 (08:56 +0100)
commitc456a5ac54a63c06b48619f8889b38ac14c2e140
treea1094fd80594d016b3f0cb2e4acd885afdce119c
parent7531dd15c9cbf0e315c6333aab96546678926615
[Metadata] Added getArtwork method of MetadataFileHandle

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-271

[Verification]
Code compiles without errors.
Checked in chrome console with below code.
Precondition: sample.mp3 with artwork need to be pushed on device

// test artwork
var path = "videos/sample.mp3";
function showBlob(bbb) {
    var elem = document.getElementById("blobImage") || document.createElement("img");
    elem.setAttribute("id", "blobImage");
    elem.setAttribute("height", "240");
    elem.setAttribute("width", "240");
    elem.setAttribute("alt", "invalid blob");
    document.getElementById("test").appendChild(elem)

    var objectURL = URL.createObjectURL(bbb);
    elem.src = objectURL;
}
var fileHandle = tizen.metadata.createFileHandle(path);
var artwork = fileHandle.getArtwork();
console.log(artwork);
showBlob(artwork)

Change-Id: Ia0cbe5ade542ad71224a91c0c1a4618072b5538e
src/metadata/metadata_api.js
src/metadata/metadata_file_handle.cc
src/metadata/metadata_file_handle.h
src/metadata/metadata_instance.cc
src/metadata/metadata_instance.h