{"id":15008707,"url":"https://github.com/rxlabz/flutter_video_launcher","last_synced_at":"2025-04-09T16:22:11.001Z","repository":{"id":56841726,"uuid":"91348803","full_name":"rxlabz/flutter_video_launcher","owner":"rxlabz","description":"A video launcher plugin for Flutter","archived":false,"fork":false,"pushed_at":"2019-08-01T02:41:14.000Z","size":5146,"stargazers_count":26,"open_issues_count":7,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T16:21:39.310Z","etag":null,"topics":["android","dartlang","flutter","objective-c","plugin"],"latest_commit_sha":null,"homepage":"https://pub.dartlang.org/packages/video_launcher","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rxlabz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-15T14:41:13.000Z","updated_at":"2021-07-31T18:44:59.000Z","dependencies_parsed_at":"2022-08-29T06:50:57.859Z","dependency_job_id":null,"html_url":"https://github.com/rxlabz/flutter_video_launcher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxlabz%2Fflutter_video_launcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxlabz%2Fflutter_video_launcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxlabz%2Fflutter_video_launcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxlabz%2Fflutter_video_launcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rxlabz","download_url":"https://codeload.github.com/rxlabz/flutter_video_launcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065286,"owners_count":21041872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","dartlang","flutter","objective-c","plugin"],"created_at":"2024-09-24T19:20:09.671Z","updated_at":"2025-04-09T16:22:10.980Z","avatar_url":"https://github.com/rxlabz.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VideoLauncher\n\n## Example\n\n```bash\ncd flutter_video_launcher/example\nflutter packages get\nflutter run\n```\n\n![screenshot](https://github.com/rxlabz/flutter_video_launcher/blob/master/screenshot.png)\n\n## Usage\n\nTo use this plugin, add video_launcher as a dependency in your pubspec.yaml file.\n\nAfter importing 'package:video_launcher/video_launcher.dart' the directories can be queried as follows\n\n## Remote video\n\nTo launch a video :\n\n```dart\nFuture\u003cNull\u003e _launch(String url) async {\n    if (await canLaunchVideo(url)) {\n      await launchVideo(url);\n    } else {\n      throw 'Could not launch $url';\n    }\n  }\n```\n\n## Local video\n\nTo play a local video file :\n\n```dart\nFuture\u003cNull\u003e _launch(String url) async {\n    if (await canLaunchVideo(url, isLocal:true)) {\n      await launchVideo(url, isLocal:true);\n    } else {\n      throw 'Could not launch $url';\n    }\n  }\n```\n\n## Embedded asset\n\nTo play video embedded assets, you can copy them to the app storage folder, and the play them \"locally\"\n\n```dart\nvoid _loadOrLaunchLocalAsset() =\u003e\n      localAssetPath != null ? _launchLocalAsset() : copyLocalAsset();\n\nFuture copyLocalAsset() async {\n  final dir = await getApplicationDocumentsDirectory();\n  final file = new File(\"${dir.path}/video_asset.mp4\");\n  final videoData = await rootBundle.load(\"assets/video.mp4\");\n  final bytes = videoData.buffer.asUint8List();\n  file.writeAsBytes(bytes, flush: true);\n    setState(() {\n    localAssetPath = file.path;\n    _launchLocalAsset();\n});\n}\n\nvoid _launchLocalAsset() =\u003e\n  setState(() =\u003e _launched = _launchVideo(localAssetPath, isLocal: true));\n```\n\nPlease see the example app of this plugin for a full example.\n\n\n## :warning: iOS App Transport Security\n\nBy default iOS forbids loading from non-https url. To cancel this restriction edit your .plist and add :\n \n```xml\n\u003ckey\u003eNSAppTransportSecurity\u003c/key\u003e\n\u003cdict\u003e\n    \u003ckey\u003eNSAllowsArbitraryLoads\u003c/key\u003e\n    \u003ctrue/\u003e\n\u003c/dict\u003e\n```\n\ncf. [Configuring App Transport Security Exceptions in iOS](https://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/)\n\n## Troubleshooting\n\nIf you get a MissingPluginException, try to `flutter build apk` on Android, or `flutter build ios`\n\n## Getting Started\n\nFor help getting started with Flutter, view our online\n[documentation](http://flutter.io/).\n    ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxlabz%2Fflutter_video_launcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frxlabz%2Fflutter_video_launcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxlabz%2Fflutter_video_launcher/lists"}