{"id":15293159,"url":"https://github.com/mojtabaghiasi/video_js","last_synced_at":"2025-04-13T12:34:45.072Z","repository":{"id":46053681,"uuid":"428554378","full_name":"mojtabaghiasi/video_js","owner":"mojtabaghiasi","description":"Flutter plugin for use Video.js in flutter web","archived":false,"fork":false,"pushed_at":"2023-02-10T08:24:01.000Z","size":1668,"stargazers_count":16,"open_issues_count":5,"forks_count":17,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T03:35:18.615Z","etag":null,"topics":["dart","dartlang","flutter","flutter-web","flutter-widget","player","video","video-player","videojs","videojs-player","videojs-plugin"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/video_js","language":"Dart","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/mojtabaghiasi.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-16T07:13:12.000Z","updated_at":"2024-06-12T17:52:54.000Z","dependencies_parsed_at":"2024-10-14T21:41:31.394Z","dependency_job_id":"1a480047-7b04-4726-9f42-8c5bb4c3a2c9","html_url":"https://github.com/mojtabaghiasi/video_js","commit_stats":{"total_commits":31,"total_committers":1,"mean_commits":31.0,"dds":0.0,"last_synced_commit":"d142eb346c632e880aaf32744e7d513805d9ecbd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaghiasi%2Fvideo_js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaghiasi%2Fvideo_js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaghiasi%2Fvideo_js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaghiasi%2Fvideo_js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mojtabaghiasi","download_url":"https://codeload.github.com/mojtabaghiasi/video_js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248714755,"owners_count":21149961,"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":["dart","dartlang","flutter","flutter-web","flutter-widget","player","video","video-player","videojs","videojs-player","videojs-plugin"],"created_at":"2024-09-30T16:40:01.946Z","updated_at":"2025-04-13T12:34:45.021Z","avatar_url":"https://github.com/mojtabaghiasi.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter Video.js player\n\nFlutter plugin for use [Video.js](https://github.com/videojs/video.js) in flutter web\n\n\u003cimg src=\"https://github.com/mojtabaghiasi/video_js/blob/master/doc/demo_image.png?raw=true\" width=\"500\"\u003e\n\n\n## Installation\n\nAdd it to your package's pubspec.yaml file\n\n```yml\ndependencies:\n  video_js: ^0.1.2\n```\n\n### Web\n\nTo implement you need to include Video.js library in the index.html of web section\n\n```javascript\n  \u003clink id=\"videojscss\" rel=\"stylesheet\" href=\"https://unpkg.com/video.js/dist/video-js.css\"\u003e\n    \u003cscript src=\"https://unpkg.com/video.js/dist/video.js\"\u003e\u003c/script\u003e\n```\n\nTo support HLS formats you need to add this script too\n\n```javascript\n  \u003cscript src=\"https://unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js\"\u003e\u003c/script\u003e\n```\n\nExample:\n\n```html\n\n\u003chead\u003e\n\t\u003cbase href=\"$FLUTTER_BASE_HREF\"\u003e\n\n\t\u003cmeta charset=\"UTF-8\"\u003e\n\t\u003cmeta content=\"IE=Edge\" http-equiv=\"X-UA-Compatible\"\u003e\n\t\u003cmeta name=\"description\" content=\"A new Flutter project.\"\u003e\n\n\t\u003c!-- iOS meta tags \u0026 icons --\u003e\n\t\u003cmeta name=\"apple-mobile-web-app-capable\" content=\"yes\"\u003e\n\t\u003cmeta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\"\u003e\n\t\u003cmeta name=\"apple-mobile-web-app-title\" content=\"example\"\u003e\n\t\u003clink rel=\"apple-touch-icon\" href=\"icons/Icon-192.png\"\u003e\n\n\t\u003ctitle\u003eexample\u003c/title\u003e\n\n\t\u003clink rel=\"manifest\" href=\"manifest.json\"\u003e\n\t\u003clink id=\"videojscss\" rel=\"stylesheet\" href=\"https://unpkg.com/video.js/dist/video-js.css\"\u003e    \u003c!-- Add this line--\u003e\n\t\u003cscript src=\"https://unpkg.com/video.js/dist/video.js\"\u003e\u003c/script\u003e                               \u003c!-- Add this line--\u003e\n\t\u003cscript src=\"https://unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js\"\u003e\u003c/script\u003e      \u003c!-- Add this line--\u003e\n\u003c/head\u003e\n```\n\n*Note*\nSee usage [example](https://github.com/mojtabaghiasi/video_js/tree/master/example) in video_js plugin\n\nThen do this in main method :\n\n```dart\nvoid main() {\n  // this line need for javascript's call backs\n  VideoJsResults().init();\n  runApp(MyApp());\n}\n```\n## Example\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:videojs/videojs.dart';\n\nvoid main(){\n  VideoJsResults().init();\n  runApp(VideoApp());\n}\n\nclass VideoApp extends StatefulWidget {\n  @override\n  _VideoAppState createState() =\u003e _VideoAppState();\n}\n\nclass _VideoAppState extends State\u003cVideoApp\u003e {\n  late VideoJsController _videoJsController;\n\n  @override\n  void initState() {\n    super.initState();\n    _videoJsController = VideoJsController(\"videoId\", videoJsOptions: VideoJsOptions(\n        controls: true,\n        loop: false,\n        muted: false,\n        poster: 'https://file-examples-com.github.io/uploads/2017/10/file_example_JPG_100kB.jpg',\n        aspectRatio: '16:9',\n        fluid: false,\n        language: 'en',\n        liveui: false,\n        notSupportedMessage: 'this movie type not supported',\n        playbackRates: [1, 2, 3],\n        preferFullWindow: false,\n        responsive: false,\n        sources: [Source(\"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4\", \"video/mp4\")],\n        suppressNotSupportedError: false));\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      title: 'Video JS Demo',\n      home: Scaffold(\n        body: Center(\n            child: VideoJsWidget(\n              videoJsController: _videoJsController,\n              height: MediaQuery.of(context).size.width / 2.5,\n              width: MediaQuery.of(context).size.width / 1.5,\n            )\n        ),\n        floatingActionButton: FloatingActionButton(\n          onPressed: () {\n            _videoJsController.isPaused((isPlaying) {\n              isPlaying != 'true'\n                  ? _videoJsController.pause()\n                  : _videoJsController.play();\n            });\n          },\n         child: const Icon(Icons.play_arrow,),\n        ),\n      ),\n    );\n  }\n}\n```\n\n\n*Note*: This plugin is still under development, and some APIs might not be available yet.\n[Feedback welcome](https://github.com/mojtabaghiasi/video_js/issues) and\n[Pull Requests](https://github.com/mojtabaghiasi/video_js/pulls) are most welcome!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmojtabaghiasi%2Fvideo_js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmojtabaghiasi%2Fvideo_js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmojtabaghiasi%2Fvideo_js/lists"}