{ "id": "174606", "key": "AC-6466", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2020-01-07T14:34:02.000+0000", "created": "2020-01-06T19:06:54.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2020-01-07T14:34:02.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "Use case:\r\n\r\nThe user want play a remote source (i.e. HLS). \r\nFirst the user starts the downloader. The length of piece is 30 min. (for example)\r\nAfter 10 sec (100 sec are downloaded) the player will started. After 100 sec. the player ends playing with regular completed event. Why? the player \"thinks\" at the time of starting that the file is 100 sec. long (this is the length at time of start).\r\nI think this is false behaviour. How can I fix?\r\n\r\nHere the dowloader:\r\nhttps://github.com/AppWerft/Ti.FFmpeg\r\n\r\n\r\n{code}\r\nvar FFmpeg = require('ti.ffmpeg')\r\nconst URL = \"https://dradiohls-vh.akamaihd.net/i/2020/01/03/eine_musik_worueber_die_welt_erstaunen_soll_von_der_drk_20200103_2230_e87b80e8.mp4/master.m3u8\");\r\nconst hlsClient = FFmpeg.createHLSClient();\r\nconst onProgess = (p) => {\r\n if (p.time > 10) { // 10 sec. buffer time\r\n hlsClient.removeEventListener(\"onProgress\",onProgress);\r\n const Player = Ti.Media.createAudioPlayer();\r\n Player.url = event.localfile;\r\n Player.start(); // stops after 100 sec, if download speed is 10x\r\n }\r\n};\r\nhlsClient.setInput(URL).setFile(Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory,'drw','worueber_die_welt_erstaunen_soll_von_der_.mp3');\r\n// callback as observer:\r\nhlsClient.addEventListener(\"onProgress\",onProgress);\r\nhlsClient.execute();\r\n{code}\r\n\r\n \r\n", "attachment": [], "flagged": false, "summary": "Duration of TiMediaAudioPlayer", "creator": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "453464", "author": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "body": "I found a dirty solution:\r\n\r\noncomplete event I'm looking in the downloader and if I see the file is longer, than I restart the player at the same position.\r\n- stop\r\n- release\r\n- seeking\r\n- setting url\r\n- start\r\n\r\nYou can close. Better would be a possibility to set the duration of player", "updateAuthor": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-01-07T14:20:15.000+0000", "updated": "2020-01-07T14:20:55.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }