I have a simple HTML media player like following,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sample Media Player</title>
<style>
video,
audio {
width: 100%;
max-width: 600px;
margin-bottom: 20px;
}
</style>
</head>
<body>
<!-- Video Player -->
<video preload="none" controls>
<source src="sample-5s.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</body>
</html>
I'm serving the HTML file with python3 -m http.server, and the video source is downloaded from https://download.samplelib.com/mp4/sample-5s.mp4.
This works seamlessly on various browsers including Mac Safari, Mobile Safari, and Chrome. However, when attempting to load the page on a Samsung Smart TV browser(TizenBrowser - 4.4.11030), I encounter the following exception:
::ffff:192.168.2.107 - - [24/Dec/2023 01:34:59] "GET / HTTP/1.1" 200 -
::ffff:192.168.2.107 - - [24/Dec/2023 01:35:12] "GET /sample-5s.mp4 HTTP/1.1" 200 -
----------------------------------------
Exception occurred during processing of request from ('::ffff:192.168.2.107', 43371, 0, 0)
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socketserver.py", line 691, in process_request_thread
self.finish_request(request, client_address)
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/server.py", line 1310, in finish_request
self.RequestHandlerClass(request, client_address, self,
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/server.py", line 671, in __init__
super().__init__(*args, **kwargs)
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socketserver.py", line 755, in __init__
self.handle()
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/server.py", line 436, in handle
self.handle_one_request()
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/server.py", line 424, in handle_one_request
method()
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/server.py", line 678, in do_GET
self.copyfile(f, self.wfile)
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/server.py", line 877, in copyfile
shutil.copyfileobj(source, outputfile)
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 200, in copyfileobj
fdst_write(buf)
File "/opt/homebrew/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socketserver.py", line 834, in write
self._sock.sendall(b)
BrokenPipeError: [Errno 32] Broken pipe
----------------------------------------
::ffff:192.168.2.107 - - [24/Dec/2023 01:35:12] "GET /sample-5s.mp4 HTTP/1.1" 200 -
Has anyone encountered a similar issue with Smart TV browsers, and are there any specific considerations or adjustments that need to be made for compatibility? Any insights or suggestions would be greatly appreciated.