I need my application to play a video file located on my network. I know the file url is:
http:
Now that I manually replace "something.local" with my true ip address, MediaPlayerit has no playback problems. However, when I have the above address, there are MediaPlayerno errors since error (1, -1007).
Therefore, I assume that this is because Android does not understand "something.local" as correct.
My question is: how can I "translate" something .local to ip itself, then to transfer it to MediaPlayer?
A little caveat: I believe that it MediaPlayerdoes not work with IPv6 addresses, so please keep that in mind ...
Just a side note if this makes my situation clearer: when I run ping something.local -4on a Windows command prompt, it returns:
Pinging something.local [192.168.1.126] with 32 bytes of data:
Reply from 192.168.1.126: bytes=32 time=145ms TTL=64
Reply from 192.168.1.126: bytes=32 time=112ms TTL=64
Reply from 192.168.1.126: bytes=32 time=32ms TTL=64
Reply from 192.168.1.126: bytes=32 time=169ms TTL=64
This translation, in which windows were transitioning from something.local -> 192.168.1.126, is what I want to do in my Android application.
source
share