{"id":36420554,"url":"https://github.com/perthcpe23/android-mjpeg-view","last_synced_at":"2026-01-11T17:32:55.166Z","repository":{"id":31589350,"uuid":"35154161","full_name":"perthcpe23/android-mjpeg-view","owner":"perthcpe23","description":"Custom View to display MJPEG","archived":false,"fork":false,"pushed_at":"2025-12-26T11:41:39.000Z","size":2229,"stargazers_count":65,"open_issues_count":8,"forks_count":21,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-12-27T23:38:38.062Z","etag":null,"topics":["android","android-mjpeg","ip-cam","ip-camera","ipcam","ipcamera","mjpeg","mjpeg-stream"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perthcpe23.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-05-06T10:48:04.000Z","updated_at":"2025-12-26T11:39:32.000Z","dependencies_parsed_at":"2024-07-20T10:46:21.020Z","dependency_job_id":null,"html_url":"https://github.com/perthcpe23/android-mjpeg-view","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/perthcpe23/android-mjpeg-view","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perthcpe23%2Fandroid-mjpeg-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perthcpe23%2Fandroid-mjpeg-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perthcpe23%2Fandroid-mjpeg-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perthcpe23%2Fandroid-mjpeg-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perthcpe23","download_url":"https://codeload.github.com/perthcpe23/android-mjpeg-view/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perthcpe23%2Fandroid-mjpeg-view/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28315879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","android-mjpeg","ip-cam","ip-camera","ipcam","ipcamera","mjpeg","mjpeg-stream"],"created_at":"2026-01-11T17:32:54.761Z","updated_at":"2026-01-11T17:32:55.159Z","avatar_url":"https://github.com/perthcpe23.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# android-mjpeg-view\nAndroid custom View for displaying MJPEG stream.\n\n- This custom view only requires a specific http(s) url.\n- Supported image scaling methods are fit width, fit height, original size, stretch and best fit.\n- Only boundary is used to separate each jpeg image (i.e. each frame) from a stream. Content-length is ignored.\n- A boundary must be specified in an HTTP headr (Content-type), otherwise a default boundary pattern will be used.\n\nBasic usage\u003cbr/\u003e\n1. This library is hosted on Maven Central, so make sure you added `mavenCentral()` as one of repositories\n```gradle\ndependencyResolutionManagement {\n    ...\n    repositories {\n        ...\n        mavenCentral()\n    }\n}\n```\n\n2. Include a library in to your project by adding this to \u003cb\u003eapp level\u003c/b\u003e build.gradle file.\n```gradle\ndependencies {\n    ...\n    implementation 'com.perthcpe23.dev:android-mjpeg-view:1.1.2'\n}\n```\n\n3. Add a view to XML layout:\n````xml\n\u003ccom.longdo.mjpegviewer.MjpegView\n    android:id=\"@+id/mjpegview\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\" /\u003e\n````\n\n4. Specify mjpeg source and start streaming\n````java\nMjpegView viewer = (MjpegView) findViewById(R.id.mjpegview);\nviewer.setMode(MjpegView.MODE_FIT_WIDTH);\nviewer.setAdjustHeight(true);\nviewer.setSupportPinchZoomAndPan(true);\nviewer.setUrl(\"https://app.punyapat.me/mjpeg-server/mjpeg\");\nviewer.startStream();\n\n//when user leaves application\nviewer.stopStream();\n````\n\n5. Or Android Compose (skip #3 and #4)\n```kotlin\nMyApplicationTheme {\n    Surface(\n        modifier = Modifier.fillMaxSize(),\n    ) {\n        AndroidView(\n            modifier = Modifier.fillMaxSize(),\n            factory = { context -\u003e\n                MjpegView(context).apply {\n                    mode = MjpegView.MODE_FIT_WIDTH\n                    isAdjustHeight = true\n                    supportPinchZoomAndPan = true\n                    setUrl(\"https://app.punyapat.me/mjpeg-server/mjpeg\")\n                    startStream()\n                }\n            },\n        )\n    }\n}\n```\n\n6. Don't forget to add internet access permission to Android manifests file\n````java\n\u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\n````\n\n* You can also download .aar at https://github.com/perthcpe23/android-mjpeg-view/tree/master/aar\n\n# Contact\nperth.s28@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperthcpe23%2Fandroid-mjpeg-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperthcpe23%2Fandroid-mjpeg-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperthcpe23%2Fandroid-mjpeg-view/lists"}