Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Playing video located with in application
Started by chanond.b Sep 22 2019 07:58 AM

1 reply to this topic
video android ios

Best Answer chanond.b , 22 September 2019 - 08:28 AM

Ah just found solution, due to problem with file permission http://docs.coronalabs.com/guide/data/readWriteFiles/index.html#androidrestrict

 

after few try with managing file, it's all work out now thx :)

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

chanond.b

[GLOBAL: userInfoPane.html]
chanond.b
  • Observer

  • 2 posts
  • Corona SDK

I have remake project which required to play demo like video in the application.

 

So, I have try few API and example like.

By trying to make 1 scene to handle all mp4 from setVariable. 

 

file structure as

 

- main.lua

- vdo.lua

- vdo/demo/dolphin-game-demo.mp4

-- media : almost ok but can't control when to stop
-- vdoPath : "vdo/demo/dolphin-game-demo.mp4"
-- vdoCallback : as function
-- local vdo = media.playVideo( util.getVdoPath(), true, util.getVdoCallBack() ) -- not work on android

--native video : not show anything at all
-- video = native.newVideo( display.contentCenterX, display.contentCenterY, 320, 480 )
-- video:load( util.getVdoPath(), system.DocumentsDirectory ) 
    
-- lastly : work in corona emu, not for android, didn't try on iOS yet
local options = { hasBackground=false, baseUrl=system.ResourceDirectory, urlRequest=listener }
native.showWebPopup( left, top, fullw, fullh, "vdoplayer.html", options )

Kinda stuck with this for a week already, if there is any other solution please guide me a bit. (pretty newbie with Corona). 

 

 

 



[TOPIC: post.html]
#2

chanond.b

[GLOBAL: userInfoPane.html]
chanond.b
  • Observer

  • 2 posts
  • Corona SDK

  Best Answer

Ah just found solution, due to problem with file permission http://docs.coronalabs.com/guide/data/readWriteFiles/index.html#androidrestrict

 

after few try with managing file, it's all work out now thx :)




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: video, android, ios