Fetch http/https don't work on tv

i am trying to create a webapp in javascript,
when I fetch an https or http link it doesn’t work

or rather, on the emulator of tizen studio it loads the image correctly, if I debug it on the tv it doesn’t work

the code with which I make the call:

const getBase64FromUrl = async (url) => {
  const data = await fetch(url);
  const blob = await data.blob();
  return new Promise((resolve) => {
    const reader = new FileReader();
    reader.onloadend = () => {
      const base64data = reader.result;   

var image = await getBase64FromUrl('https://upload.wikimedia.org/wikipedia/it/thumb/6/60/Bumblebee_film.jpg/1200px-Bumblebee_film.jpg');


<?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/provawebapi" version="1.0.0" viewmodes="maximized">
    <access origin="*" subdomains="true"></access>
    <tizen:application id="WkVpo9m6vL.provawebapi" package="WkVpo9m6vL" required_version="2.3"/>
    <content src="index.html"/>
    <feature name="http://tizen.org/feature/screen.size.normal.1080.1920"/>
    <icon src="tv (3).png"/>
    <tizen:metadata key="http://samsung.com/tv/metadata/use.network" value="true"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/network.public"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/productinfo"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/contentsdownload"/>
    <tizen:profile name="tv-samsung"/>
    <tizen:setting screen-orientation="landscape" context-menu="enable" background-support="enable" encryption="disable" install-location="auto" hwkey-event="enable" sound-mode="shared"/>

I suggest you try a Q/A inquiry on this page The Smart TV Seller Office likes to do their support there.

Samsung Developer Relations

1 Like