LivePro - 支持低版本 Typecho 播放声音 的 Live插件

滑到底部看效果

简介

LivePro 是一款专为 Typecho 设计的插件,支持 低版本(1.1也支持) 程序,播放带有声音的 Live Photo 功能。它允许用户在文章中轻松插入带有动态效果的实况照片,增强阅读体验。
image.png
image.png
image.png

功能特性

  • 简单易用:通过简单的短代码即可在文章中插入 Live Photo。
  • 可配置性强:支持自定义 Live 图标、图标尺寸、背景颜色、圆角半径等。
  • 声音播放:支持播放 Live Photo 中的声音。
  • 触摸支持:在触摸设备上也能流畅使用。

安装步骤

  1. 下载插件,将压缩包上传至 /www/wwwroot/*.com/usr/plugins/ 路径下并解压。
  2. 将解压后的文件夹重命名为 LivePro
  3. 登录 Typecho 后台,启用 LivePro 插件。

使用方法

在文章编辑器中插入以下短代码:

[livephoto photo=".jpg" video=".mov" ratio="0.73"]
  • photo:指定照片的 URL。
  • video:指定视频的 URL。
  • ratio:指定照片和视频的宽高比,默认为 0.74937963

配置选项

在 Typecho 后台的插件配置页面,你可以进行以下配置:

  • Live 图标 URL:指定 Live 图标的 URL,默认为插件目录下的 live.png
  • 图标宽度(px):指定图标的宽度,默认为 16px
  • 图标高度(px):指定图标的高度,默认为 16px
  • 背景颜色:指定背景框的颜色,使用 HEX 格式,默认为半透明黑色 #00000080
  • 圆角半径(px):指定背景框的圆角半径,默认为 4px
  • 显示文字标签:是否在图标旁边显示“实况”文字标签。
  • 图标垂直偏移(px):调整图标相对于文字的垂直位置,负值上移,正值下移,默认 -2px
  • 背景框宽度:指定背景框的宽度,默认为 auto,也可以输入具体像素值。
  • 背景框高度:指定背景框的高度,默认为 auto,也可以输入具体像素值。
  • 背景框内边距:指定背景框的内边距,格式为“上右下左”,默认值为 6px 8px

注意事项

  • 请确保照片和视频的 URL 是正确的,并且服务器允许访问这些资源。
  • 如果浏览器未允许视频自动播放权限,将无法播放实况照片。

版本信息

当前版本:1.1.3

作者信息

LivePro - Typecho Live Plugin

Introduction

LivePro is a plugin designed specifically for Typecho, supporting the Live Photo function with sound playback. It allows users to easily insert dynamic live photos into articles, enhancing the reading experience.

Features

  • Easy to use: Insert Live Photos into articles with simple shortcodes.
  • Highly configurable: Support customizing Live icons, icon sizes, background colors, border radii, etc.
  • Sound playback: Support playing the sound in Live Photos.
  • Touch support: Works smoothly on touch devices.

Installation Steps

  1. Download the plugin and upload the compressed package to the /www/wwwroot/*.com/usr/plugins/ path and extract it.
  2. Rename the extracted folder to LivePro.
  3. Log in to the Typecho background and enable the LivePro plugin.

Usage

Insert the following shortcode into the article editor:

[livephoto photo=".jpg" video=".mov" ratio="0.73"]
  • photo: Specify the URL of the photo.
  • video: Specify the URL of the video.
  • ratio: Specify the aspect ratio of the photo and video, default is 0.74937963.

Configuration Options

On the plugin configuration page in the Typecho background, you can make the following configurations:

  • Live Icon URL: Specify the URL of the Live icon, default is live.png in the plugin directory.
  • Icon Width (px): Specify the width of the icon, default is 16px.
  • Icon Height (px): Specify the height of the icon, default is 16px.
  • Background Color: Specify the color of the background box, use HEX format, default is semi-transparent black #00000080.
  • Border Radius (px): Specify the border radius of the background box, default is 4px.
  • Show Text Label: Whether to display the "Live" text label next to the icon.
  • Icon Vertical Offset (px): Adjust the vertical position of the icon relative to the text, negative values move up, positive values move down, default is -2px.
  • Background Box Width: Specify the width of the background box, default is auto, you can also enter a specific pixel value.
  • Background Box Height: Specify the height of the background box, default is auto, you can also enter a specific pixel value.
  • Background Box Padding: Specify the padding of the background box, the format is "top right bottom left", default value is 6px 8px.

Notes

  • Please ensure that the URLs of the photo and video are correct and the server allows access to these resources.
  • If the browser does not allow the video to play automatically, the live photo cannot be played.

Version Information

Current Version: 1.1.3

Author Information

实况
浏览器未允许视频自动播放权限,无法播放实况照片。