{"id":13744138,"url":"https://github.com/myflashlab/surfaceVideoPlayer-ANE","last_synced_at":"2025-05-09T02:32:41.702Z","repository":{"id":31156939,"uuid":"34716976","full_name":"myflashlab/surfaceVideoPlayer-ANE","owner":"myflashlab","description":"SurfacePlayer air native extension helps you play video files inside your air mobile projects and you can control the position of the player by setting x, y, width and height parameters.","archived":true,"fork":false,"pushed_at":"2020-08-06T11:13:11.000Z","size":30839,"stargazers_count":11,"open_issues_count":0,"forks_count":5,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-15T15:42:11.014Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"ActionScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myflashlab.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-28T08:00:39.000Z","updated_at":"2023-01-28T00:44:21.000Z","dependencies_parsed_at":"2022-08-23T21:10:23.428Z","dependency_job_id":null,"html_url":"https://github.com/myflashlab/surfaceVideoPlayer-ANE","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/myflashlab%2FsurfaceVideoPlayer-ANE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FsurfaceVideoPlayer-ANE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FsurfaceVideoPlayer-ANE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FsurfaceVideoPlayer-ANE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myflashlab","download_url":"https://codeload.github.com/myflashlab/surfaceVideoPlayer-ANE/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253177839,"owners_count":21866405,"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-08-03T05:01:03.756Z","updated_at":"2025-05-09T02:32:41.196Z","avatar_url":"https://github.com/myflashlab.png","language":"ActionScript","readme":"# Surface Video Player ANE (Android+iOS)\nSurfacePlayer extension lets you play video files inside your air mobile projects and you can control the position of the player by setting x, y, width and height parameters. if you need to play your videos in native players out of your app, please check out: https://github.com/myflashlab/videoPlayer-ANE. you may also use our YouTube link parser found here: https://github.com/myflashlab/AS3-youtube-parser-video-link/ and with that you can easily play YouTube videos too. but **please notice that this surface player can play local videos only**, so even if you wish to play a youtube video, you need to download it first and then play it back. If you want to stream an online video though, like a YouTube video, you can again use our other fullscreen player ANE mentioned above.\n\n[find the latest **asdoc** for this ANE here.](http://myflashlab.github.io/asdoc/com/myflashlab/air/extensions/player/surface/package-detail.html)\n\n# Demo Videos\n[YouTube demo of how the extension works](https://www.youtube.com/watch?v=HefrQwCSkKE) \n\n# AIR Usage\nFor the complete AS3 code usage, see the [demo project here](https://github.com/myflashlab/surfaceVideoPlayer-ANE/blob/master/AIR/src/Demo.as).\n\n```actionscript\nimport com.myflashlab.air.extensions.player.surface.*;\n\nvar _ex:SurfacePlayer = new SurfacePlayer(stage);\n\n// on Android, when the surface player is availble, it will hijack the device back button clicks! with the folloiwng listener you can listen to device's back button clicks\n_ex.addEventListener(SurfacePlayerEvent.ON_BACK_CLICKED, onBackClickedWhenSurfacePlayerIsAvailable);\n\n// dispatches when the video has reached end\n_ex.addEventListener(SurfacePlayerEvent.ON_COMPLETION_LISTENER, onVideoPlaybackCompleted);\n\n// when you attach a video file _ex.attachVideo(file); this listener will tell you if this file is availble or not. play your video only if it is availble\n_ex.addEventListener(SurfacePlayerEvent.ON_FILE_AVAILABILITY, onTargetVideoAvailability);\n\n// this listener will tell you different states that your Media is in. \"STARTED\", \"PAUSED\", \"STOPPED\"\n_ex.addEventListener(SurfacePlayerEvent.ON_MEDIA_STATUS_CHANGED, onMediaStatusChanged);\n\n// the first thing you should do is to initialize the extension with its initial parameters\n_ex.init(x, y, width, height, true); // the last parameter is the ratio for your video clip if false, the video will be stretched to fit your specified width and height\n\n// after initializing the extension, you need to attach a new video file to it\n_ex.attachVideo(File.applicationStorageDirectory.resolvePath(\"testVideoPlayerSurface.mp4\"), SurfaceVideoLocation.ON_APP);\n\n// and finally play it! (it is important to play the video after the SurfacePlayerEvent.ON_FILE_AVAILABILITY event is dispatched)\n//_ex.play();\n\n// there are many other methods for you to control the video playback like pause, seek, fullscreen, set volume, etc. please study the sample demo project\n// coming with this extension to know how you can work with the other methods and when/how to dispose the extension properly.\n```\n\n# Air .xml manifest\n```xml\n\u003c!--\nEmbedding the ANE:\n--\u003e\n  \u003cextensions\u003e\n  \n\t\u003cextensionID\u003ecom.myflashlab.air.extensions.videoPlayerSurface\u003c/extensionID\u003e\n\t\n\t\u003c!-- dependency ANEs https://github.com/myflashlab/common-dependencies-ANE --\u003e\n\t\u003cextensionID\u003ecom.myflashlab.air.extensions.dependency.overrideAir\u003c/extensionID\u003e\n\t\n  \u003c/extensions\u003e\n--\u003e\n```\n\n# Requirements\n* Android SDK 15+\n* iOS 10.0+\n* AIR SDK 30+\n\n# Permissions\nBelow are the list of Permissions this ANE might require. Check out the demo project available at this repository to see how we have used the [PermissionCheck ANE](http://www.myflashlabs.com/product/native-access-permission-check-settings-menu-air-native-extension/) to ask for the permissions.\n\nNecessary | Optional\n--------------------------- | ---------------------------\n. | [SOURCE_STORAGE](https://myflashlab.github.io/asdoc/com/myflashlab/air/extensions/nativePermissions/PermissionCheck.html#SOURCE_STORAGE)\n\n# Commercial Version\nhttps://www.myflashlabs.com/product/surface-embedded-video-player-ane/\n\n[![Surface Video Player ANE](https://www.myflashlabs.com/wp-content/uploads/2015/11/product_adobe-air-ane-extension-surface-video-player-2018-680x844.jpg)](https://www.myflashlabs.com/product/surface-embedded-video-player-ane/)\n\n# Tutorials\n[How to embed ANEs into **FlashBuilder**, **FlashCC** and **FlashDevelop**](https://www.youtube.com/watch?v=Oubsb_3F3ec\u0026list=PL_mmSjScdnxnSDTMYb1iDX4LemhIJrt1O)  \n\n# Premium Support #\n[![Premium Support package](https://www.myflashlabs.com/wp-content/uploads/2016/06/professional-support.jpg)](https://www.myflashlabs.com/product/myflashlabs-support/)\nIf you are an [active MyFlashLabs club member](https://www.myflashlabs.com/product/myflashlabs-club-membership/), you will have access to our private and secure support ticket system for all our ANEs. Even if you are not a member, you can still receive premium help if you purchase the [premium support package](https://www.myflashlabs.com/product/myflashlabs-support/).","funding_links":[],"categories":["Native Extension","AIR Native Extensions"],"sub_categories":["Multimedia ANE"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyflashlab%2FsurfaceVideoPlayer-ANE","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyflashlab%2FsurfaceVideoPlayer-ANE","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyflashlab%2FsurfaceVideoPlayer-ANE/lists"}