htmlplayer 0.1.1__tar.gz → 0.1.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: htmlplayer
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: 一个简单的HTML视频播放器,使用Edge浏览器或系统默认浏览器播放视频
5
5
  Home-page: https://github.com/yourusername/htmlplayer
6
6
  Author: lenvy1
@@ -49,12 +49,6 @@ play_video('https://example.com/video.mp4')
49
49
  play_video('https://example.com/video.mp4', width=1280, height=720)
50
50
  ```
51
51
 
52
- ### 指定视频宽高比
53
-
54
- ```python
55
- play_video('https://example.com/video.mp4', video_aspect_ratio=21/9)
56
- ```
57
-
58
52
  ### 仅使用Edge浏览器
59
53
 
60
54
  ```python
@@ -73,7 +67,7 @@ play_with_browser('https://example.com/video.mp4')
73
67
 
74
68
  ## API 文档
75
69
 
76
- ### play_video(url, width=None, height=None, video_aspect_ratio=16/9, use_edge=True, use_browser_fallback=True)
70
+ ### play_video(url, width=None, height=None, use_edge=True, use_browser_fallback=True)
77
71
 
78
72
  使用Edge浏览器或系统默认浏览器播放视频。
79
73
 
@@ -81,18 +75,17 @@ play_with_browser('https://example.com/video.mp4')
81
75
  - `url` (str): 视频URL地址
82
76
  - `width` (int, optional): 窗口宽度
83
77
  - `height` (int, optional): 窗口高度
84
- - `video_aspect_ratio` (float): 视频宽高比,默认16:9
85
78
  - `use_edge` (bool): 是否优先使用Edge浏览器,默认True
86
79
  - `use_browser_fallback` (bool): Edge不可用时是否使用默认浏览器,默认True
87
80
 
88
81
  **返回:**
89
82
  - `bool`: 播放是否成功启动
90
83
 
91
- ### play_with_edge(url, width=None, height=None, video_aspect_ratio=16/9)
84
+ ### play_with_edge(url, width=None, height=None)
92
85
 
93
86
  仅使用Edge浏览器播放视频。
94
87
 
95
- ### play_with_browser(url, width=None, height=None, video_aspect_ratio=16/9)
88
+ ### play_with_browser(url, width=None, height=None)
96
89
 
97
90
  使用系统默认浏览器播放视频。
98
91
 
@@ -100,7 +93,7 @@ play_with_browser('https://example.com/video.mp4')
100
93
 
101
94
  查找Microsoft Edge浏览器的安装路径。
102
95
 
103
- ### calculate_window_size(screen_width=None, screen_height=None, video_aspect_ratio=16/9, scale=0.5)
96
+ ### calculate_window_size(width=None, height=None, scale=0.5)
104
97
 
105
98
  计算合适的窗口大小。
106
99
 
@@ -129,4 +122,3 @@ python -c "import htmlplayer; import os; print(os.path.join(os.path.dirname(html
129
122
  ## 许可证
130
123
 
131
124
  MIT License
132
-
@@ -25,12 +25,6 @@ play_video('https://example.com/video.mp4')
25
25
  play_video('https://example.com/video.mp4', width=1280, height=720)
26
26
  ```
27
27
 
28
- ### 指定视频宽高比
29
-
30
- ```python
31
- play_video('https://example.com/video.mp4', video_aspect_ratio=21/9)
32
- ```
33
-
34
28
  ### 仅使用Edge浏览器
35
29
 
36
30
  ```python
@@ -49,7 +43,7 @@ play_with_browser('https://example.com/video.mp4')
49
43
 
50
44
  ## API 文档
51
45
 
52
- ### play_video(url, width=None, height=None, video_aspect_ratio=16/9, use_edge=True, use_browser_fallback=True)
46
+ ### play_video(url, width=None, height=None, use_edge=True, use_browser_fallback=True)
53
47
 
54
48
  使用Edge浏览器或系统默认浏览器播放视频。
55
49
 
@@ -57,18 +51,17 @@ play_with_browser('https://example.com/video.mp4')
57
51
  - `url` (str): 视频URL地址
58
52
  - `width` (int, optional): 窗口宽度
59
53
  - `height` (int, optional): 窗口高度
60
- - `video_aspect_ratio` (float): 视频宽高比,默认16:9
61
54
  - `use_edge` (bool): 是否优先使用Edge浏览器,默认True
62
55
  - `use_browser_fallback` (bool): Edge不可用时是否使用默认浏览器,默认True
63
56
 
64
57
  **返回:**
65
58
  - `bool`: 播放是否成功启动
66
59
 
67
- ### play_with_edge(url, width=None, height=None, video_aspect_ratio=16/9)
60
+ ### play_with_edge(url, width=None, height=None)
68
61
 
69
62
  仅使用Edge浏览器播放视频。
70
63
 
71
- ### play_with_browser(url, width=None, height=None, video_aspect_ratio=16/9)
64
+ ### play_with_browser(url, width=None, height=None)
72
65
 
73
66
  使用系统默认浏览器播放视频。
74
67
 
@@ -76,7 +69,7 @@ play_with_browser('https://example.com/video.mp4')
76
69
 
77
70
  查找Microsoft Edge浏览器的安装路径。
78
71
 
79
- ### calculate_window_size(screen_width=None, screen_height=None, video_aspect_ratio=16/9, scale=0.5)
72
+ ### calculate_window_size(width=None, height=None, scale=0.5)
80
73
 
81
74
  计算合适的窗口大小。
82
75
 
@@ -105,4 +98,3 @@ python -c "import htmlplayer; import os; print(os.path.join(os.path.dirname(html
105
98
  ## 许可证
106
99
 
107
100
  MIT License
108
-
@@ -7,7 +7,7 @@ from .core import (
7
7
  calculate_window_size
8
8
  )
9
9
 
10
- __version__ = "0.1.1"
10
+ __version__ = "0.1.2"
11
11
  __all__ = [
12
12
  "play_video",
13
13
  "play_with_edge",
@@ -23,14 +23,9 @@ def demo_window_calculation():
23
23
  print("\n窗口大小计算演示:")
24
24
  print("-" * 30)
25
25
 
26
- # 获取屏幕尺寸并计算
26
+ # 获取屏幕尺寸并计算默认窗口大小
27
27
  width, height = calculate_window_size()
28
- print(f"默认窗口大小: {width}x{height}")
29
-
30
- # 不同宽高比
31
- for aspect_ratio in [16/9, 21/9, 4/3, 9/16]:
32
- w, h = calculate_window_size(video_aspect_ratio=aspect_ratio)
33
- print(f"宽高比 {aspect_ratio:.2f}: {w}x{h}")
28
+ print(f"默认窗口大小: {int(width)}x{int(height)}")
34
29
 
35
30
 
36
31
  def demo_different_configs():
@@ -38,14 +33,13 @@ def demo_different_configs():
38
33
  print("\n不同配置演示:")
39
34
  print("-" * 30)
40
35
 
41
- # 这里只是示例,实际运行时可以取消注释
42
36
  print("1. 仅Edge浏览器(无回退):")
43
37
  print(" play_video(url, use_edge=True, use_browser_fallback=False)")
44
38
 
45
39
  print("\n2. 强制使用系统浏览器:")
46
40
  print(" play_video(url, use_edge=False, use_browser_fallback=True)")
47
41
 
48
- print("\n3. 自定义窗口:")
42
+ print("\n3. 自定义窗口大小:")
49
43
  print(" play_video(url, width=1920, height=1080)")
50
44
 
51
45
 
@@ -63,4 +57,3 @@ def main():
63
57
 
64
58
  if __name__ == '__main__':
65
59
  main()
66
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: htmlplayer
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: 一个简单的HTML视频播放器,使用Edge浏览器或系统默认浏览器播放视频
5
5
  Home-page: https://github.com/yourusername/htmlplayer
6
6
  Author: lenvy1
@@ -49,12 +49,6 @@ play_video('https://example.com/video.mp4')
49
49
  play_video('https://example.com/video.mp4', width=1280, height=720)
50
50
  ```
51
51
 
52
- ### 指定视频宽高比
53
-
54
- ```python
55
- play_video('https://example.com/video.mp4', video_aspect_ratio=21/9)
56
- ```
57
-
58
52
  ### 仅使用Edge浏览器
59
53
 
60
54
  ```python
@@ -73,7 +67,7 @@ play_with_browser('https://example.com/video.mp4')
73
67
 
74
68
  ## API 文档
75
69
 
76
- ### play_video(url, width=None, height=None, video_aspect_ratio=16/9, use_edge=True, use_browser_fallback=True)
70
+ ### play_video(url, width=None, height=None, use_edge=True, use_browser_fallback=True)
77
71
 
78
72
  使用Edge浏览器或系统默认浏览器播放视频。
79
73
 
@@ -81,18 +75,17 @@ play_with_browser('https://example.com/video.mp4')
81
75
  - `url` (str): 视频URL地址
82
76
  - `width` (int, optional): 窗口宽度
83
77
  - `height` (int, optional): 窗口高度
84
- - `video_aspect_ratio` (float): 视频宽高比,默认16:9
85
78
  - `use_edge` (bool): 是否优先使用Edge浏览器,默认True
86
79
  - `use_browser_fallback` (bool): Edge不可用时是否使用默认浏览器,默认True
87
80
 
88
81
  **返回:**
89
82
  - `bool`: 播放是否成功启动
90
83
 
91
- ### play_with_edge(url, width=None, height=None, video_aspect_ratio=16/9)
84
+ ### play_with_edge(url, width=None, height=None)
92
85
 
93
86
  仅使用Edge浏览器播放视频。
94
87
 
95
- ### play_with_browser(url, width=None, height=None, video_aspect_ratio=16/9)
88
+ ### play_with_browser(url, width=None, height=None)
96
89
 
97
90
  使用系统默认浏览器播放视频。
98
91
 
@@ -100,7 +93,7 @@ play_with_browser('https://example.com/video.mp4')
100
93
 
101
94
  查找Microsoft Edge浏览器的安装路径。
102
95
 
103
- ### calculate_window_size(screen_width=None, screen_height=None, video_aspect_ratio=16/9, scale=0.5)
96
+ ### calculate_window_size(width=None, height=None, scale=0.5)
104
97
 
105
98
  计算合适的窗口大小。
106
99
 
@@ -129,4 +122,3 @@ python -c "import htmlplayer; import os; print(os.path.join(os.path.dirname(html
129
122
  ## 许可证
130
123
 
131
124
  MIT License
132
-
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "htmlplayer"
8
- version = "0.1.1"
8
+ version = "0.1.2"
9
9
  authors = [
10
10
  { name = "lenvy1", email = "lenvy1@163.com" }
11
11
  ]
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
3
3
 
4
4
  setup(
5
5
  name="htmlplayer",
6
- version="0.1.1",
6
+ version="0.1.2",
7
7
  packages=find_packages(),
8
8
  include_package_data=True,
9
9
  description="一个简单的HTML视频播放器,使用Edge浏览器或系统默认浏览器播放视频",
File without changes
File without changes