GNU General Public License v3.0

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

项目背景与痛点

YiNote 是一款浏览器插件,专注于在线视频的笔记记录。在视频内容日益丰富的今天,无论是学习课程、还是技术分享,覆盖大量信息的视频内容越来越难以消化。YiNote 解决的正是用户在观看这些视频时无法高效做笔记、在视频中查找重要信息的痛点。通过这款插件,用户不仅能直观地在视频上做笔记,还能方便地回顾之前记录的笔记内容,从而提高学习和工作的效率。

核心技术揭秘

YiNote 的实现包含多个关键技术栈和设计模式。从技术架构上来看,主要是前端交互和后端存储的紧密结合,辅以中间数据传输层,实现了用户在浏览器中的无缝笔记记录体验。

graph TD A[用户操作插件] --> B{"初始化"} B -->|"成功"| C[调用前端API] C --> D[生成笔记数据] D --> E{"本地/云端存储校验"} E -->|"本地存储"| F[保存笔记至本地] E -->|"云端存储"| G[传输至后端] G --> H[后端存储笔记] H --> I{"用户请求笔记"} I -->|"本地"| J[加载本地笔记] I -->|"云端"| K[从后端拉取笔记]

其中,前端插件通过监听用户操作,实时抓取视频的时间戳和笔记内容,并通过数据传输层与后端进行通信,将笔记数据实时保存至用户的本地文件或云端存储服务。这样一个架构不仅高效解决了用户即时做笔记的需求,还通过云端存储的方式保证了笔记在不同设备间的无缝迁移能力。

功能亮点与差异

除了强大的笔记功能外,YiNote 在用户体验上做出了显著改进。它允许用户在笔记中插入图像、代码片段,甚至直接插入视频片段,极大地增强了笔记内容的表现力和互动性。相比其他同类产品,YiNote 更加注重用户的个性配置和内容安全,允许用户自定义笔记主题、字体样式,甚至选择不同的存储和同步方式,满足不同场景下的需求。

应用场景与落地建议

将 YiNote 应用于生产环境或复杂的学习任务时,开发者应关注其在不同浏览器和不同网络条件下的兼容性和性能。尽管它以本地存储为主,并支持云同步,但是对于大量笔记内容的用户,建议加强云端同步机制的稳定性和优化数据传输效率。从应用场景来说,YiNote 特别适合在线学习平台、视频研讨会、专业课程和个人工作笔记等场景。

综合评价

YiNote 的设计与实现,展现了全面的功能模块与高可用性的理念,在保持用户体验流畅的同时,也保证了数据的安全同步。然而,在大规模用户场景下,如何确保云端数据的安全性和传输效率是一个需要继续优化的方向。此外,尽管其功能强大,但在某些浏览器的兼容性上的表现仍有改进空间。整体来说,YiNote 展现了极高的实用价值,是一款值得推荐的在线笔记工具。

关于

GitHub 原始描述(英文)

YiNote browser extension - online video note taking tool

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

CSS
HTML
JavaScript
SCSS

Release

README

YiNote 2.0 Release Note: We are excited to announce the release of YiNote 2.0. This release brings a host of new features, improvements, and bug fixes. Get started with YiNote 2.0 to explore the enhance note-taking experience.

YiNote Browser Extension

YiNote, aka TurboNote Chrome Extension, is an effective tool to take and share notes while watching online videos.

Installation

Table of Contents

Introduction

Purpose and history

YiNote, aka TurboNote chrome extension, is developed to help online learner and video editor to bookmark thoughts and ideas in a fine-grained way while working or learning with online materials. It was developed in 2016 as a side project, and luckily loved by thousands users all around the world.

During the COVID-19 pandemic, I rewrote the extension in a more scalable and maintainable approach. Hopefully it can fill the needs from different users, and boost your learning experience to next level.

Features

  • Take time-stamped note while watching online video, currently supported video formats/platform:
    • Youtube video
    • Embedded youtube iframe video
    • HTML5 video
    • Local video via browser
  • Send notes to popular note platforms
    • Google Docs
    • MS OneNote
    • Evernote
  • Support markdown styling in editor
  • Generate PDF with video screenshot
  • Annotate screenshot
  • Bookmark video
  • Tag bookmarks
  • Search through bookmarks and notes
  • Export and import of data

Get started

How to use

There are serveral options to use this extension:

  • Install extension from web stores

    Please see Installation section to install extension from official platform stores. If you are user before v1.0.0, please checkout Migrations Guide for more information.

  • Build and install extension locally

    You can also build the extension, then run it locally. Please see Development for more information.

Development
Prerequisite

Suggested environment:

  • Node >= 10.0.0
  • NPM >= 6.0.0
Install dependencies
yarn install
Start development

Run yarn start:ext.

For content script change, you need to reload the extension in chrome://extensions tab.

For background and options changes, just refresh the page should be able to load the changes.

playground mode is also provided to easy content script development. This mode simulates content script to inject UI widget in page served from webpack dev server

For more information about how to develop browser extensions, please refer to Chrome extension get started

About the project

Project components

This extension inject content script to display UI widget and interact with host page.

Background Scripts is used for message handling and handling data migrations.

Options page is provided to give more webpage real estate for data management and configuring settings.

YiNote store data in browser.storage on user’s local device.

Tech stack

Thanks for the open source community. YiNote depends on lots of awesome open source modules. In the following part, I’ll only list part of them to share base knowledge of the how this project is built.

Browser support

YiNote leverages mozilla’s Web extension polyfill to achieve better support for Chrome, Firefox and other Chrome-compatible browsers. For detailed support informarion, please see Supported Browsers

Contribute

As a community

As a developer

Please read the Contribution Guide

Translate YiNote

YiNote only supports English currently, please help translate YiNote to make it accessible to more users. To translate please follow the English message json file and translate the content in message field into other languages. For detailed information, please follow this Browser extension i18n doc

All kinds of contributions from anyone are always welcomed!

Support YiNote in your website

If you have a video website and want to make it work with YiNote, but unfortunately YiNote is not able to properly detect video on your website. There are serveral options you can try.

  • Add a new Player to YiNote by following this pull request

  • Add player hook in your website.

    1. Add data attribute, [data-yinote="yinote-hook-player"], to your video element. So YiNote can properly locate your video element.
    2. Add message listener to watch on video action messages from YiNote.
    window.addEventListener('message', event => {
      const { data } = event;
      if (data.from !== 'yi-note') {
        return;
      }
    
      switch (data.action) {
        case 'play':
          // handle play video
          return;
        case 'pause':
          // handle pause video
          return;
        case 'seek':
          // get secondsToSeek from data.data
          // then seek to certain time with your player
          return;
        case 'getCurrentTime':
          // get current time from your player, then
          window.postMessage({ ...data, data: $currentTime }, *);
          return;
        case 'getDuration':
          // get duration from your player, then
          window.postMessage({ ...data, data: $duration }, *);
          return;
      }
    }, false);
    

Roadmap

  • (Done) Integration with popular note / document platforms, like Evernote, onenote, google doc.

  • (Done) Sync notes from mooc platforms

  • Web article annotation

  • Cloud support

  • Fine grained note sharing

  • Multiple devices support (Desktop browser, mobile devices)

FAQs

How to share notes with others?

  • YiNote can send notes to Evernote, MS OneNote, Google Docs since v1.2.0. You can firstly send notes to one of the supported services, then generate share link from there.
  • You can also export notes as JSON file in options page, then send the exported JSON file out. Whoever get the exported file can then import it via options page.

What should I prepare if I decide not to use YiNote extension any more?

YiNote save users data in chrome local storage (per extension), which means delete the extension will also erase saved notes from your browser. YiNote provides a backup strategy in options page to export local data into a json file. Please make sure you backup your data before delete the extension. Cloud support will be provided in the future to achieve better sync and backup.

Why I bookmarked same title and thumbnail for different videos on Youtube?

Youtube don’t update page metas, like title and thumbnails, when video changed in page. So reload page is needed to make sure YiNote can capture proper metadata for the video. YiNote also enabled settings in options page to enable auto reload when video change. Page domain, like www.youtube.com, need to be added when enable this setting. YiNote only applys reload behaviour to listed domains in the settings page.

License

Copyright © 2016 - now

Licensed under the GNU GPL3.0 License. View license

评论

暂无评论