Skip to content

Commit

Permalink
feat: 发送短视频
Browse files Browse the repository at this point in the history
  • Loading branch information
Redmomn committed Aug 28, 2024
1 parent 46aa662 commit d6dbdbb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion client/internal/highway/bdh.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import (
"github.com/LagrangeDev/LagrangeGo/utils/binary"
)

const BlockSize = 256 * 1024
// 视频必须是1024*1024

const BlockSize = 1024 * 1024

type Transaction struct {
CommandID uint32
Expand Down
4 changes: 2 additions & 2 deletions client/richmedia.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func (c *QQClient) VideoUploadPrivate(targetUid string, video *message.ShortVide
if err != nil {
return nil, err
}
err = c.highwayUpload(1005, video.Stream, uint64(video.Size), md5, extStream)
err = c.highwayUpload(1001, video.Stream, uint64(video.Size), md5, extStream)
if err != nil {
return nil, err

Expand Down Expand Up @@ -332,7 +332,7 @@ func (c *QQClient) VideoUploadPrivate(targetUid string, video *message.ShortVide
if err != nil {
return nil, err
}
err = c.highwayUpload(1006, bytes.NewReader(video.Thumb), uint64(video.ThumbSize), md5, extStream)
err = c.highwayUpload(1002, bytes.NewReader(video.Thumb), uint64(video.ThumbSize), md5, extStream)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit d6dbdbb

Please sign in to comment.