Local video is not working on Samsung smart TV Emulator - samsung-smart-tv

I am developping a SAMSUNG SMart TV application to read a video from à local web server (Apache) following this tuto (tut00055)
But the window screen on the application remains black!
Here is a screen shot of my www folder:
http://www.hostingpics.net/viewer.php?id=516795folder.png
and here is the project that I tested:
http://www74.zippyshare.com/v/54021535/file.html
I have also changed the folder permission, but in vain... the screen remains black!
I can read the videos with my browser (with the same URL!) but not with the Samsung Smart TV emulator :(
And in the output console, I got always :
1060 Key pressed: 71
1061 PLAY
1062 Play
What's wrong with my application?
Thanks in advance!

In your videoList.xml don't use
<link>http://127.0.0.1/testy/alphabet.mp4</link>
Rather your pc Apache IP address:
<link>http://192.168.32.138/testy/alphabet.mp4</link>
192.168.32.138 is an example. In terminal type ifconfig, it will be the inet addr the Apache IP address you should use in the link tags.

Related

Accessing localhost API from android device

I'm developing a Flutter app on a physical android device, I don't know much about networking and I'm having a trouble using an API from the phone to a local database on my laptop.
I reviewed all the answers in this post
Cannot connect to localhost API from Android app
Nothing seems to work for me, I'm using Apache server on XAMPP, and the API works just fine from the laptop (127.0.0.1:8000/api/Students) but when I try to access it from the phone it doesn't work (I replaced 127.0.0.1 with the IP of my laptop which I took from ipconfig)
XAMPP control panel
when I try to access the server from the phone using laptop-IP:80 it access normally the same with laptop-IP:80/phpmyadmin
XAMPP dashboard
but only when my phone is connected to the laptop mobile hotspot, when I connect the two devices to the same WIFI network it shows that it's unreachable:
but when I try laptop-IP:8000/api/Students this happens:
this site can't be reached
I tried to modify Apache httpd.conf:
#Listen 12.34.56.78:80
Listen 8000 <-- Added this
from what I understood this makes the server listens to port 8000 but I'm left with the same problem
NOTE: all the pictures show my attempts to use the API on my phone's Chrome browser
You need to do some tweaks to the url to access it in the device as localhost is only known to the machine not the devices on which the app is running.
The urls are different for different devices
Emulator
Real phone (with usb debugging)
1.Emulator
static const baseUrl = "http://10.0.2.2:8000";
2.Real Device
static const baseUrl = "http://localhost:8000";
Additionally you need to run these command in your cmd,
adb reverse tcp:8000 tcp:8000
Now your requests would go like:
get('$baseUrl/api/Students');

View localhost from Iphone using MacBook Pro

So I am attempting to view my localhost from my Mackbook on my iPhone. I am attempting to do so through USB connection with developmental modes on in Safari in both devices. I've tried to connect to localhost 2 ways so far with no success:
First I've opened up my System Preferences on my MacBook. I opened up the sharing option. Then I clicked "Internet Sharing" toggle on the left. I noted my computer name and clicked the option "iPhone USB." I then navigated to <cpuname>.local:4200, with 4200 being the port I'm using in for localhost. This has Safari saying that it cannot reach the server.
Second I opened a terminal and typed "ifconfig" to find my CPU IP address. I then attempted to navigate to my localhost from my phone using <cpuip>:4200 This also failed with Safari saying that it could not connect to the server.
I have done no other configurations and am interested in hearing what I should do. Any help would be greatly appreciated.
Extra Info
The application is a simple Angular application.
Both devices are connected to the same network.
For anybody suffering this problem, I've found a solution using the hint from this link here. The solution was to bind the host to port 0.0.0.0. In the Angular 2+ way, that would mean serving the app with the --host 0.0.0.0 --disableHostCheck flags. Good luck!

ionic serve with wifi hotspot to test on mobile

I'm trying to test our app in the mobile browser.
I started a wifi hotspot
Ran ionic serve on our project root
Connected to wifi on mobile device
On mobile browser went to http://localhost:8100
but I get a page not found. Shouldn't the ionic app load on browse if I connect to the wifi hotspot of the pc running the app server?
ionic serve like in the accepted answer did not work for me. But
ionic serve --host=COMMON_NETWORK_IP and connecting to
COMMON_NETWORK_IP:8100 on the phone, did.
Look up your COMMON_NETWORK_IP via ifconfig (unix) or ipconfig (windows).
If you are on WiFi and use a mac, you can also use a GUI:
localhost is your local address. If you want to access to the ionic app served by your PC from your mobile device browser, you should use the ip address of your PC instead of localhost, since localhost is the address of your mobile device.
So just run an ifconfig (unix) or ipconfig (windows) on your terminal and access to the app with this address from your mobile device : http://IP_OF_YOUR_PC:8100
This may not work depending on your firewall rules.
The best way to do it:
Make Personal Hotspot from your mobile Device to your Computer
run ionic serve
Read the the output this command throws. There you can see an External IP-Adress
Open the Browser on your smartphone and use the Exernal IP-Adress + 8100 (Port)
For example: http://192.168.32.12:8100
All you need to do is make sure your laptop and mobile are on the same Wifi Connection
Just Run ionic serve
Network: http://192.168.1.***:8100/
Type that network address in your mobile browser
It works for all create-react-app & vue-cli
Hot reload will also work
If you don't have WiFi use a mobile hotspot

Using Plex with Chromecast vs RasPlex?

For the last few months I've been using Plex with Chromecast to stream video to my TV. The Plex Server runs on my laptop. The data is streamed over wifi through the laptop from a shared network drive (not NAS). I use the Plex iOS app on an iPad as a remote control. Probably not the best setup but it's been working pretty well.
I just heard about RasPlex "A Plex Client for the Raspberry Pi computer" and am trying to understand what it does that is different than my current set up.
In the iOS iPad app, I select Chromecast (connected to TV) to "cast" to – so is the iOS app the Plex Client? Would there be any advantage to switching to RasPlex?
Ideally what I would like to do is get the Plex Server onto a Raspbery Pi and free up my laptop – but apparently the Pi doesn't do transcoding.
A bit confused. . .
because the rasplex is a dedicated client, that automatically uses CEC over HDMI to select movies etc from. so basically a mini computer that turns itself automatically in a client without having to use other remote tools. so basically you turn your tv into a smart tv, as long as the rasplex is connected with wifi/network cable and hdmi

Controlling browser with IR remote

I'm totally beginner at Raspberry Pi. Is there some way how to control web browser URL with infrared remote? I already saved key codes with LIRC library. (for example key volume up will open google.com, key volume down will open facebook.com etc.)
How to do it? Thanks
You can launch a script that's waiting for IR and when you receive you code you launch a System command like this:
chromium-browser --kiosk www.google.com
hope it helpes