Pyckplayer 1.0.3__tar.gz → 1.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyckplayer-1.0.3/src/Pyckplayer.egg-info → pyckplayer-1.0.4}/PKG-INFO +1 -1
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/setup.py +1 -1
- {pyckplayer-1.0.3 → pyckplayer-1.0.4/src/Pyckplayer.egg-info}/PKG-INFO +1 -1
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/core.py +22 -14
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/LICENSE +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/MANIFEST.in +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/README.md +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/pyproject.toml +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/setup.cfg +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/Pyckplayer.egg-info/SOURCES.txt +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/Pyckplayer.egg-info/dependency_links.txt +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/Pyckplayer.egg-info/entry_points.txt +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/Pyckplayer.egg-info/requires.txt +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/Pyckplayer.egg-info/top_level.txt +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/__init__.py +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/LICENSE +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/ckplayer.css +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/ckplayer.ixigua.css +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/ckplayer.red.css +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/adclose.png +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/buffer.png +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/ckplayer.48.png +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/ckplayer.png +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/ckplayer_ixigua.48.png +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/ckplayer_ixigua.png +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/ckplayer_red.48.png +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/ckplayer_red.png +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/favicon.ico +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/loading.png +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/logo.png +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/play.png +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/flv.js/LICENSE +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/flv.js/README.md +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/flv.js/flv.js +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/flv.js/flv.js.map +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/flv.js/flv.min.js +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/flv.js/flv.min.js.map +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/hls.js/LICENSE +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/hls.js/README.md +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/hls.js/hls-demo.js +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/hls.js/hls-demo.js.map +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/hls.js/hls.js +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/hls.js/hls.js.d.ts +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/hls.js/hls.js.map +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/hls.js/hls.light.js +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/hls.js/hls.light.js.map +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/hls.js/hls.light.min.js +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/hls.js/hls.light.min.js.map +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/hls.js/hls.min.js +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/hls.js/hls.min.js.map +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/js/ckplayer.js +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/js/ckplayer.min.js +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/language/en.js +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/language/zh.cn.js +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/language/zh.hk.js +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/mpegts.js/LICENSE +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/mpegts.js/mpegts.js +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/mpegts.js/mpegts.js.map +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/mpegts.js/mpegts.min.js +0 -0
- {pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/cli.py +0 -0
|
@@ -97,6 +97,8 @@ def detect_stream_type(url: str) -> str:
|
|
|
97
97
|
return 'hls'
|
|
98
98
|
elif '.flv' in url_lower:
|
|
99
99
|
return 'flv'
|
|
100
|
+
elif '.ts' in url_lower:
|
|
101
|
+
return 'ts'
|
|
100
102
|
elif '.mp4' in url_lower:
|
|
101
103
|
return 'mp4'
|
|
102
104
|
else:
|
|
@@ -110,9 +112,6 @@ def generate_html(video_url: str,
|
|
|
110
112
|
css_path = quote((script_dir / "ckplayer" / "css" / "ckplayer.css").as_posix())
|
|
111
113
|
js_path = quote((script_dir / "ckplayer" / "js" / "ckplayer.js").as_posix())
|
|
112
114
|
favicon_path = quote((script_dir / "ckplayer" / "css" / "images" / "logo.png").as_posix())
|
|
113
|
-
|
|
114
|
-
hls_js_path = quote((script_dir / "ckplayer" / "hls.js" / "hls.min.js").as_posix())
|
|
115
|
-
flv_js_path = quote((script_dir / "ckplayer" / "flv.js" / "flv.min.js").as_posix())
|
|
116
115
|
|
|
117
116
|
stream_type = detect_stream_type(video_url)
|
|
118
117
|
|
|
@@ -122,24 +121,35 @@ def generate_html(video_url: str,
|
|
|
122
121
|
"video": video_url,
|
|
123
122
|
"autoplay": True,
|
|
124
123
|
"loop": False,
|
|
125
|
-
"live": stream_type in ['hls', 'flv'],
|
|
126
|
-
"buffer": 1,
|
|
127
124
|
"preload": "auto",
|
|
128
|
-
"playbackRate": [0.5, 0.75, 1, 1.25, 1.5, 2],
|
|
129
125
|
}
|
|
130
126
|
|
|
131
127
|
if stream_type == 'hls':
|
|
132
|
-
video_object["
|
|
133
|
-
video_object["
|
|
128
|
+
video_object["plug"] = "hls.js"
|
|
129
|
+
video_object["live"] = True
|
|
134
130
|
elif stream_type == 'flv':
|
|
135
|
-
video_object["
|
|
136
|
-
video_object["
|
|
131
|
+
video_object["plug"] = "flv.js"
|
|
132
|
+
video_object["live"] = True
|
|
133
|
+
elif stream_type == 'ts':
|
|
134
|
+
video_object["plug"] = "mpegts.js"
|
|
135
|
+
video_object["live"] = True
|
|
137
136
|
|
|
138
137
|
if poster_url:
|
|
139
138
|
video_object["poster"] = poster_url
|
|
140
139
|
|
|
141
140
|
video_object_js = json.dumps(video_object)
|
|
142
141
|
|
|
142
|
+
js_includes = ""
|
|
143
|
+
if stream_type == 'hls':
|
|
144
|
+
hls_js_path = quote((script_dir / "ckplayer" / "hls.js" / "hls.min.js").as_posix())
|
|
145
|
+
js_includes = f'<script type="text/javascript" src="file:///{hls_js_path}"></script>\n '
|
|
146
|
+
elif stream_type == 'flv':
|
|
147
|
+
flv_js_path = quote((script_dir / "ckplayer" / "flv.js" / "flv.min.js").as_posix())
|
|
148
|
+
js_includes = f'<script type="text/javascript" src="file:///{flv_js_path}"></script>\n '
|
|
149
|
+
elif stream_type == 'ts':
|
|
150
|
+
mpegts_js_path = quote((script_dir / "ckplayer" / "mpegts.js" / "mpegts.min.js").as_posix())
|
|
151
|
+
js_includes = f'<script type="text/javascript" src="file:///{mpegts_js_path}"></script>\n '
|
|
152
|
+
|
|
143
153
|
html_content = f"""<!DOCTYPE html>
|
|
144
154
|
<html lang="zh-CN">
|
|
145
155
|
<head>
|
|
@@ -148,10 +158,8 @@ def generate_html(video_url: str,
|
|
|
148
158
|
<title>{title}</title>
|
|
149
159
|
<link rel="icon" href="file:///{favicon_path}" type="image/png">
|
|
150
160
|
<link rel="shortcut icon" href="file:///{favicon_path}" type="image/png">
|
|
151
|
-
<link rel="stylesheet" href="file:///{css_path}">
|
|
152
|
-
<script src="file:///{
|
|
153
|
-
<script src="file:///{flv_js_path}"></script>
|
|
154
|
-
<script src="file:///{js_path}"></script>
|
|
161
|
+
<link rel="stylesheet" type="text/css" href="file:///{css_path}">
|
|
162
|
+
{js_includes}<script type="text/javascript" src="file:///{js_path}"></script>
|
|
155
163
|
<style>
|
|
156
164
|
body, html {{ margin: 0; padding: 0; background-color: #000; overflow: hidden; }}
|
|
157
165
|
#player {{ width: 100%; height: 100vh; }}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/ckplayer_ixigua.48.png
RENAMED
|
File without changes
|
{pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/ckplayer_ixigua.png
RENAMED
|
File without changes
|
{pyckplayer-1.0.3 → pyckplayer-1.0.4}/src/pyckplayer/ckplayer/css/images/ckplayer_red.48.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|