truvideo_media_sdk 1.0.2 copy "truvideo_media_sdk: ^1.0.2" to clipboard
truvideo_media_sdk: ^1.0.2 copied to clipboard

Manages cloud-based media operations, including uploading photos/videos and generating links, with support for canceling uploads.

Truvideo Media SDK #

This Flutter plugin integrates the TruvideoMediaSdk for uploading media files (videos, images, etc.) with rich metadata and tags. It also allows retrieving upload progress and searching media based on tags.

Supported Platforms #

  • Android
  • iOS

Features #

  • Upload media files (e.g., videos) with tags and metadata
  • Track upload progress, success, and errors with callbacks
  • Search media based on uploaded tags
  • Retrieve upload metadata by ID or fetch all uploads

Requirements #

  • TruvideoMediaSdk Plugin

Setup #

  1. Add TruvideoMediaSdk Plugin to your project.
  2. Install dependencies:
    flutter pub get
    
  3. Ensure proper permissions in AndroidManifest.xml & Info.plist.
  4. Run the app:
    flutter run
    

Usage #

  • Upload Media with Tags & Metadata:
      final builder = MediaBuilder("/sdcard/DCIM/test.mp4")
      ..setTag("color", "blue")
      ..setTag("source", "flutter-sdk")
      ..setMetaData("uploadedBy", "truvideo");
        
      await builder.build();
        
      await builder.upload(
      onProgress: (e) => print("Progress: ${e['progress']}%"),
      onComplete: (e) => print("Upload Complete: ${e['remoteURL']}"),
      onError: (e) => print("Upload Failed: ${e['error']}"),
      );
    
  • Retrieve Upload Info:
      final mediaId = builder.getMediaId();
        
      // Get a single upload record
      final single = await TruvideoMediaSdk.getFileUploadRequestById(mediaId!);
      print("Upload Info: $single");
        
      // Get all upload requests
      final all = await TruvideoMediaSdk.getAllFileUploadRequests();
      print("All Uploads: $all");
    
  • Search Uploaded Media by Tags
      Map<String, String> tagMap = {
      "color": "blue",
      "source": "flutter-sdk",
      };
    
      String tagJson = jsonEncode(tagMap);
        
      String? response = await TruvideoMediaSdk.search(
      tagJson: tagJson,
      type: "All", // Options: Video, AUDIO, Picture, PDF
      page: 1,
      pageSize: 10,
      );
        
      print("Search result:\n$response");
    

License #

MIT #

Support #

If you have any questions or suggestions regarding the SDK, please contact us at support@truvideo.com.

0
likes
150
points
46
downloads

Publisher

verified publishertruvideo.com

Weekly Downloads

Manages cloud-based media operations, including uploading photos/videos and generating links, with support for canceling uploads.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on truvideo_media_sdk

Packages that implement truvideo_media_sdk