i’m tring to connect Smartview with my Hosted webapp, When i make a local debug, the content will be obtained from 192.168.118.230(my local). Calling the msf.local () method will report an error, and SmartView will use the http request during initialization. 127.0.0.1 will be accessed from 192.168.118.230, which will cause CORS problems.
*** can you provide a quick start demo for hosted web app to access smartview? currently, no one has been found after searching.**
*** are there any best practices for hosted web app to access smartview?**
Here is the configuration of config.xml for our local debug。
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://yourdomain/TikTokTVDevLocal" version="1.1.3" viewmodes="maximized">
<access origin="*"></access>
<tizen:allow-navigation>*.test.com</tizen:allow-navigation>
<tizen:application id="f7fdjwFenr.TikTokTVDevLocal" package="f7fdjwFenr" required_version="2.3"/>
<content src="http://192.168.118.230/tizen"/> // local debug cotent src
<!-- <content src="https://tv.test.com/tizen"/> --> // production content src
<tizen:content-security-policy>
default-src 'self' blob: data: 'unsafe-inline' 'unsafe-eval' *
</tizen:content-security-policy>
<feature name="http://tizen.org/feature/screen.size.normal.1080.1920"/>
<icon src="icon_local_512.png"/>
<tizen:metadata key="http://samsung.com/tv/metadata/devel.api.version" value="2.4"/>
<tizen:metadata key="http://samsung.com/tv/metadata/screen/orientation" value="all"/>
<name>TikTokTVDevLocal</name>
<tizen:privilege name="http://developer.samsung.com/privilege/hostedapp_deviceapi_allow"/>
<tizen:privilege name="http://developer.samsung.com/privilege/productinfo"/>
<tizen:privilege name="http://developer.samsung.com/privilege/adinfo"/>
<tizen:privilege name="http://developer.samsung.com/privilege/network.public"/>
<tizen:privilege name="http://tizen.org/privilege/internet"/>
<tizen:privilege name="http://tizen.org/privilege/tv.inputdevice"/>
<tizen:profile name="tv-samsung"/>
<tizen:setting screen-orientation="landscape" context-menu="enable" background-support="disable" encryption="disable" install-location="auto" hwkey-event="enable"/>
<tizen:video_splash_screen ready_when="custom">
<tizen:vss_default video="splash_long.mp4" background_image="background.png" background_color="#000000" image="logo.png" image_border="0px stretch"/>
</tizen:video_splash_screen>
<tizen:metadata key="http://samsung.com/tv/metadata/use.preview" value="endpoint_URL=http://tv.test.com/tizen/preview"/>
<tizen:app-control>
<tizen:src name="http://tv.test.com/tizen" reload="disable"></tizen:src>
<tizen:operation name="http://samsung.com/appcontrol/operation/eden_resume"></tizen:operation>
</tizen:app-control>
</widget>
This is a CORS error when calling msf.local()
the reason i try to find that there is a request in msf.local to make a channel like that.