{"id":3542,"url":"https://github.com/MarcinMoskala/VideoPlayView","last_synced_at":"2025-08-03T22:32:25.176Z","repository":{"id":83821715,"uuid":"106308373","full_name":"MarcinMoskala/VideoPlayView","owner":"MarcinMoskala","description":"Custom Android view with video player, loader and placeholder image","archived":false,"fork":false,"pushed_at":"2017-10-16T09:53:39.000Z","size":111173,"stargazers_count":93,"open_issues_count":3,"forks_count":18,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-24T16:22:40.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarcinMoskala.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2017-10-09T16:34:44.000Z","updated_at":"2024-11-13T10:17:03.000Z","dependencies_parsed_at":"2024-01-02T21:35:16.703Z","dependency_job_id":null,"html_url":"https://github.com/MarcinMoskala/VideoPlayView","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinMoskala%2FVideoPlayView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinMoskala%2FVideoPlayView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinMoskala%2FVideoPlayView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinMoskala%2FVideoPlayView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarcinMoskala","download_url":"https://codeload.github.com/MarcinMoskala/VideoPlayView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228571844,"owners_count":17938772,"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":[],"created_at":"2024-01-05T20:16:44.441Z","updated_at":"2024-12-07T06:30:50.257Z","avatar_url":"https://github.com/MarcinMoskala.png","language":"Kotlin","funding_links":[],"categories":["Libraries","Players \u0026 Clients","Kotlin"],"sub_categories":["GUI","Mobile \u0026 Web Players"],"readme":"# VideoPlayerView\n\nCustom Android view with video player, loader and placeholder image.\n\n[![](https://jitpack.io/v/marcinmoskala/VideoPlayView.svg)](https://jitpack.io/#marcinmoskala/VideoPlayView)\n[![Analytics](https://ga-beacon.appspot.com/UA-92159206-4/main-page?pixel)](https://github.com/MarcinMoskala/VideoPlayView)\n[![Analytics](https://ga-beacon.appspot.com/UA-92159206-7/main-page?pixel)](https://github.com/MarcinMoskala/VideoPlayView)\n\n\nTo stay up-to-date with news about the library [![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/fold_left.svg?style=social\u0026label=Follow%20%40marcinmoskala)](https://twitter.com/marcinmoskala?ref_src=twsrc%5Etfw)\n\n## Usage\n\nHere is an example flow:\n\n![Gif example](art/flow.gif)\n\n[Here](https://github.com/MarcinMoskala/VideoPlayView/blob/master/app/src/main/res/layout/activity_sample.xml) you can view all examples visible on gif.\n\nWhen you use `loop` then video will be looping forever:\n\n![Img1](art/loop.gif)\n\n```xml\n\u003ccom.marcinmoskala.videoplayview.VideoPlayView\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"200dp\"\n    app:loop=\"true\"\n    app:videoUrl=\"https://github.com/MarcinMoskala/VideoPlayView/raw/master/videos/cat1.mp4\" /\u003e\n```\n\nYou can set custom loader for the time when movie is downloaded from URL:\n\n![Img1](art/loading.gif)\n\n```xml\n\u003ccom.marcinmoskala.videoplayview.VideoPlayView\n    android:id=\"@+id/bigVideoView\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"200dp\"\n    app:videoUrl=\"https://github.com/MarcinMoskala/VideoPlayView/raw/master/videos/gdg.mp4\" /\u003e\n```\n\nStatic images can be set in xml, as `loadingButton`, but to display gif we need to use some library, like Glide:\n\n```java\nVideoPlayView bigVideoView = findViewById(R.id.bigVideoView);\nGlide.with(this)\n        .load(R.drawable.loader)\n        .into(bigVideoView.getLoadingView());\n```\n\nYou can also show preview images. What is more, videos can be paused by user and preview image is shown then:\n\n![Img1](art/pause.gif)\n\n```xml\n\u003ccom.marcinmoskala.videoplayview.VideoPlayView\n    android:id=\"@+id/picassoVideoView\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"200dp\"\n    app:loop=\"true\"\n    app:videoUrl=\"https://github.com/MarcinMoskala/VideoPlayView/raw/master/videos/cat1.mp4\" /\u003e\n```\n\nImage for loading and for pause can be defined in xml as `image` or it can be set programmatically. Then we can use libraries, like Picasso, to load it:\n\n```java\nVideoPlayView videoView = findViewById(R.id.picassoVideoView);\nPicasso.with(this).load(\"http://i.imgur.com/DvpvklR.png\").into(videoView.getImageView());\n```\n\n## Customization\n\nVideoPlayerView properties are:\n* `image` - reference to preview image.\n* `playButton` - reference to play button image.\n* `loadingButton` - reference to loader image.\n* `videoUrl` - video url.\n* `playButton` - max vale of progress (100 by default).\n* `loop` - video will be replayed automatically when it is finished (`false` by default).\n* `autoplay` - video will be played automatically when it is loaded (`false` by default).\n\n## Installation\n\nJust add in your module `build.gradle` following dependency:\n\n```groovy\ndependencies {\n    compile 'com.github.marcinmoskala:VideoPlayView:0.0.2'\n}\n```\n\nAlso add on your module `build.gradle` (unless you already have it):\n\n```groovy\nrepositories {\n    maven { url 'https://jitpack.io' }\n}\n```\n\nLicense\n-------\n\n    Copyright 2017 Marcin Moskała\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarcinMoskala%2FVideoPlayView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMarcinMoskala%2FVideoPlayView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarcinMoskala%2FVideoPlayView/lists"}