User Tools

Site Tools


getmedialist

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
getmedialist [2016/09/06 08:11]
act
getmedialist [2016/09/06 08:17]
act [Examples]
Line 2: Line 2:
 The ''​GetMediaList''​ function returns a list of media items for the given camera. If ''​forceReload''​ is true then the media list is loaded from the camera, else a possible locally cached media list is returned. If no local cached media list is available then the list is loaded from the camera. The ''​GetMediaList''​ function returns a list of media items for the given camera. If ''​forceReload''​ is true then the media list is loaded from the camera, else a possible locally cached media list is returned. If no local cached media list is available then the list is loaded from the camera.
  
 +==== Media list item ====
 A media list item has the following fields: A media list item has the following fields:
   * ''​mediakey'':​ A unique key identifying the media item. This key must be used for all media related operations.   * ''​mediakey'':​ A unique key identifying the media item. This key must be used for all media related operations.
Line 19: Line 20:
 // False is returned if the given camera is not connected // False is returned if the given camera is not connected
 // or if loading of the media list fails. // or if loading of the media list fails.
 +</​code>​
 +
 +Accessing a media item:
 +<​code>​
 +var result = GetMediaList("​GoPro Hero 4");
 +if (result.length > 0)
 +{
 +  LogText("​Media item size: " + result[0].filesize);​
 +}
 </​code>​ </​code>​
getmedialist.txt · Last modified: 2016/09/06 08:17 by act