{"id":13744135,"url":"https://github.com/richpixel/SongPickerANE","last_synced_at":"2025-05-09T02:32:53.011Z","repository":{"id":6725836,"uuid":"7971689","full_name":"richpixel/SongPickerANE","owner":"richpixel","description":"A song picker/player AIR native extension for iOS and Android.","archived":false,"fork":false,"pushed_at":"2015-09-11T14:50:02.000Z","size":45049,"stargazers_count":27,"open_issues_count":11,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-15T15:42:14.639Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"ActionScript","has_issues":true,"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/richpixel.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2013-02-02T04:42:57.000Z","updated_at":"2019-08-03T00:40:05.000Z","dependencies_parsed_at":"2022-08-24T18:00:17.917Z","dependency_job_id":null,"html_url":"https://github.com/richpixel/SongPickerANE","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/richpixel%2FSongPickerANE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richpixel%2FSongPickerANE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richpixel%2FSongPickerANE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richpixel%2FSongPickerANE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richpixel","download_url":"https://codeload.github.com/richpixel/SongPickerANE/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253177851,"owners_count":21866407,"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.703Z","updated_at":"2025-05-09T02:32:48.000Z","avatar_url":"https://github.com/richpixel.png","language":"ActionScript","readme":"SongPickerANE\n=============\n\nA song picker/player AIR native extension for iOS and Android.\n\nAuthor: Rich Lovejoy (https://github.com/richpixel)\n\nThe SongPicker Air Native Extension lets you choose a song from your music library on your iOS or Android device \nusing the native media picker, and play it back using the native media player.\n\n#Notes:#\n- You must include the following lines in the Android manifest section of your app config xml file to use the picker:\n\n  ...\n\t\n\u003capplication\u003e\n\u003cactivity android:name=\"com.newpixel.songpicker.PickSongActivity\" android:theme=\"@android:style/Theme.Translucent.NoTitleBar\"\u003e\u003c/activity\u003e\n\u003c/application\u003e\n\n- You must specify the iOS SDK to build against when packaging an app for iOS. (ActionScript Build Packaging \u003e Apple iOS \u003e Native Extensions)\n\n\n#Usage#\n\nInclude the SongPicker.ane in your project.\n\nimport com.newpixel.air.nativeextensions.SongPicker;\nimport com.newpixel.air.nativeextensions.SongPickerEvent;\n\n  ...\n\n\tSongPicker.instance.addEventListener(SongPickerEvent.SONG_CHOSEN, songChooseHandler);\n\tSongPicker.instance.addEventListener(SongPickerEvent.CANCELLED_SONG_PICKER, cancelPickHandler);\t\n\tSongPicker.instance.pickSong();\n\n\n#API#\n\nSongPicker class methods\n\n- isNativeMediaPickerAvailable():Boolean\n\tReturns true if there is a native media picker on this device. This may return false on some Android devices, like the Kindle.\n\t\n- pickSong(downloadedSongsOnly:Boolean=true):void\n    Bring up the native media picker to allow a user to choose a song from his library. \n    Triggers the SongPickerEvent.SONG_CHOSEN or SongPickerEvent.CANCELLED_SONG_PICKER when the picker is dismissed.\n  \tArgs:\n  \t  - downloadedSongsOnly: If true, the device will only show songs that are downloaded on the device, and ignore those in the cloud.\n  \t  \n- playSong(songId:String=\"\", position:Number=-1):void\n    Begin playing a song with the specified ID, or resume playing the current song if songId is \"\".\n    Args:\n      - songId: The persistent ID of the song to play, which is obtained after picking a song with the picker.\n      - position: A playhead position in seconds, to begin playing the song. The default value -1 tells the player \n                  to begin playing at the start of the song or to resume where it left off.\n\n  \n- pauseSong():void\n    Pause the current song playback.\n\n- stopSong():void\n    Stop current song playback.\n\n- setVolume():void\n\tPass a Number between 0 and 1 to set the volume of the currently playing song.\n\t\n- getVolume():Number\n\tReturns a Number between 0 and 1 - the volume of the currently playing song.\n\n- setPlayheadTime():void\n\tPass a Number in seconds to set the playhead of the currently playing song.\n\t\n- getPlayheadTime():Number\n\tReturns a Number in seconds - the playhead of the currently playing song.\n\t\n- fadeOutSong(fadeTime:Number):void\n\tFade down the song's volume to 0 in fadeTime seconds.\n\n- fadeInSong(fadeTime:Number):void\n\tFade up the song's volume from 0 in fadeTime seconds.\n\t\nSongPickerEvent\n\n- SONG_CHOSEN: Triggered when the user has selected a song from the media picker. The following properties will be available in the event object:\n    - ID (String): persistent ID of the song. This is a 64-bit number on iOS and a URI on Android.\n    - title (String): title of track.\n    - artist (String): artist of track.\n    - duration (int): length of the track in seconds\n\n- CANCELLED_SONG_PICKER: User has cancelled picking a song.\n- SONG_FINISHED: Playback of current song has finished.\n\n#Examples#\n\n  See the SongPickerExample project which can be built with FlashBuilder.\n\n  \n","funding_links":[],"categories":["Native Extension","AIR Native Extensions"],"sub_categories":["Multimedia ANE"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichpixel%2FSongPickerANE","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichpixel%2FSongPickerANE","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichpixel%2FSongPickerANE/lists"}